php-src/ext/phar/tests/031.phpt

32 lines
540 B
Plaintext
Raw Normal View History

2006-03-11 06:55:09 +08:00
--TEST--
2007-01-09 03:31:50 +08:00
Phar: include and parser error
2006-03-11 06:55:09 +08:00
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--INI--
phar.require_hash=0
2006-03-11 06:55:09 +08:00
--FILE--
<?php
$pharconfig = 3;
require_once 'files/phar_oo_test.inc';
2006-03-11 06:55:09 +08:00
Phar::loadPhar($fname);
$pname = 'phar://' . $fname . '/a.php';
var_dump(file_get_contents($pname));
require $pname;
?>
===DONE===
--CLEAN--
<?php
2013-09-18 16:52:51 +08:00
unlink(dirname(__FILE__) . '/files/031.phar.php');
2006-03-11 06:55:09 +08:00
__halt_compiler();
?>
--EXPECTF--
string(25) "<?php echo new new class;"
2013-09-18 16:52:51 +08:00
Parse error: %s in phar://%s031.phar.php/a.php on line %d