We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2834d5a commit dc66e68Copy full SHA for dc66e68
src/Phar.php
@@ -35,11 +35,9 @@ function php_strip_whitespace(string $file): string
35
if (preg_match('!^(//|#[^\[]).*$!', $line)) {
36
return null;
37
}
38
- // Prevent processing non-comment lines (eg: containing php:// or http:// uris)
39
- // to be mistakenly treated as such
40
- return preg_replace('!\s(//|#[^\[]).*$!', '', $line);
41
- // Not working: breaks phpcc self-compiling
42
- //return preg_replace('!([^:])' . '(//|#[^\[])' . '.*$!', '$1', $line);
+ // Prevent processing non-comment lines to be mistakenly treated as such
+ // eg: context uris containing "php://" or "http://", or this regexp
+ return preg_replace('!([^:(])(//|#[^\[]).*$!', '$1', $line);
43
}, $lines);
44
45
// Second pass: multi-line comments
0 commit comments