1--TEST-- 2Phar: delete test 3--SKIPIF-- 4<?php if (!extension_loaded("phar")) die("skip"); ?> 5--INI-- 6phar.readonly=0 7phar.require_hash=0 8detect_unicode=0 9--FILE-- 10<?php 11$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; 12$pname = 'phar://' . $fname; 13$file = "<?php 14Phar::mapPhar('hio'); 15__HALT_COMPILER(); ?>"; 16 17$files = array(); 18$files['a'] = 'a'; 19include 'files/phar_test.inc'; 20include $fname; 21$phar = new Phar($fname); 22 23echo file_get_contents($pname . '/a') . "\n"; 24$phar->delete('a'); 25echo file_get_contents($pname . '/a') . "\n"; 26?> 27--CLEAN-- 28<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> 29--EXPECTF-- 30a 31 32Warning: file_get_contents(phar://%sdelete.phar.php/a): failed to open stream: phar error: "a" is not a file in phar "%sdelete.phar.php" in %sdelete.php on line 16 33