1--TEST--
2ast\parse_code() throwing a ParseError
3--FILE--
4<?php
5
6$code = '<?php &$(")$/)!"';
7
8try {
9    ast\parse_code($code, 70);
10} catch (ParseError $e) {
11    echo $e, "\n";
12}
13try {
14    ast\parse_code($code, 70, 'file.php');
15} catch (ParseError $e) {
16    echo $e, "\n";
17}
18
19?>
20--EXPECTF--
21ParseError: syntax error, unexpected %s&%s expecting end of file in string code:1
22Stack trace:
23#0 %s(%d): ast\parse_code('%s', %d)
24#1 {main}
25ParseError: syntax error, unexpected %s&%s expecting end of file in file.php:1
26Stack trace:
27#0 %s(%d): ast\parse_code('%s', %d, 'file.php')
28#1 {main}
29