--TEST--
syntax check
--SKIPIF--
--INI--
display_errors=stdout
--FILE--
';
file_put_contents($filename, $code);
var_dump(`"$php" -n -l "$filename"`);
var_dump(`"$php" -n -l some.unknown`);
$code = '
';
file_put_contents($filename, $code);
if (defined("PHP_WINDOWS_VERSION_MAJOR")) {
var_dump(`"$php" -n -l "$filename"`);
} else {
var_dump(`"$php" -n -l "$filename" 2>/dev/null`);
}
@unlink($filename);
echo "Done\n";
?>
--EXPECTF--
string(%d) "No syntax errors detected in %s006.test.php
"
string(%d) "No input file specified.
"
string(%d) "
Parse error: %s expecting %s{%s in %s006.test.php on line 5
Errors parsing %s006.test.php
"
Done