code: private function checkForValidPhp($content) : bool
      {
          $len = strlen($content);
          $start = 0;
          $valid = false;
          while (($start = strpos($content, '<?', $start)) !== false) {
              $valid = true;
              $start++;
              $end = strpos($content, '?>', $start + 1);
              if ($end === false) {
                  $end = $len;
              }
              while (++$start < $end) {
                  $content = ord($content[$start]);
                  if ($content < 9 || ($content >= 14 && $content <= 31) || $content == 11 || $content == 12) {
                      return false;
                  }
              }
          }
  
          return $valid;
      }
docs: @param $content
  
  @return bool