xref: /php-src/Zend/tests/bug75252.phpt (revision 55a15f32)
1--TEST--
2Bug #75252: Incorrect token formatting on two parse errors in one request
3--FILE--
4<?php
5
6$code = <<<'CODE'
7function test_missing_semicolon() : string {
8     $x = []
9     FOO
10}
11CODE;
12
13try {
14    eval($code);
15} catch (ParseError $e) {
16    var_dump($e->getMessage());
17}
18
19try {
20    eval($code);
21} catch (ParseError $e) {
22    var_dump($e->getMessage());
23}
24
25?>
26--EXPECT--
27string(41) "syntax error, unexpected identifier "FOO""
28string(41) "syntax error, unexpected identifier "FOO""
29