xref: /php-src/Zend/tests/gh10634.phpt (revision ac996450)
1--TEST--
2GH-10634 (Lexing memory corruption)
3--FILE--
4<?php
5function test_input($input) {
6    try {
7        eval($input);
8    } catch(Throwable $e) {
9        var_dump($e->getMessage());
10    }
11}
12
13test_input("y&/*");
14test_input("y&/**");
15test_input("y&#");
16test_input("y&#  ");
17test_input("y&//");
18?>
19--EXPECT--
20string(36) "Unterminated comment starting line 1"
21string(36) "Unterminated comment starting line 1"
22string(36) "syntax error, unexpected end of file"
23string(36) "syntax error, unexpected end of file"
24string(36) "syntax error, unexpected end of file"
25