php-src/Zend/tests/bug75252.phpt

29 lines
485 B
Plaintext
Raw Normal View History

2017-09-24 06:53:27 +00:00
--TEST--
Bug #75252: Incorrect token formatting on two parse errors in one request
--FILE--
<?php
$code = <<<'CODE'
function test_missing_semicolon() : string {
$x = []
FOO
}
CODE;
try {
eval($code);
} catch (ParseError $e) {
var_dump($e->getMessage());
}
try {
eval($code);
} catch (ParseError $e) {
var_dump($e->getMessage());
}
?>
--EXPECT--
string(41) "syntax error, unexpected identifier "FOO""
string(41) "syntax error, unexpected identifier "FOO""