xref: /PHP-8.1/ext/phar/tests/031.phpt (revision 74859783)
1--TEST--
2Phar: include and parser error
3--EXTENSIONS--
4phar
5--INI--
6phar.require_hash=0
7--FILE--
8<?php
9
10$pharconfig = 3;
11
12require_once 'files/phar_oo_test.inc';
13
14Phar::loadPhar($fname);
15
16$pname = 'phar://' . $fname . '/a.php';
17
18var_dump(file_get_contents($pname));
19require $pname;
20
21?>
22===DONE===
23--CLEAN--
24<?php
25unlink(__DIR__ . '/files/031.phar.php');
26__halt_compiler();
27?>
28--EXPECTF--
29string(25) "<?php echo new new class;"
30
31Parse error: %s in phar://%s031.phar.php/a.php on line %d
32