xref: /PHP-5.6/ext/phar/tests/031.phpt (revision 14d53417)
1--TEST--
2Phar: include and parser error
3--SKIPIF--
4<?php if (!extension_loaded("phar")) die("skip"); ?>
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(dirname(__FILE__) . '/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