1--TEST-- 2Phar: fopen a .phar for writing (existing file) 3--EXTENSIONS-- 4phar 5--INI-- 6phar.readonly=0 7phar.require_hash=0 8--FILE-- 9<?php 10$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; 11$pname = 'phar://' . $fname; 12$file = "<?php __HALT_COMPILER(); ?>"; 13 14$files = array(); 15$files['a.php'] = '<?php echo "This is a\n"; ?>'; 16$files['b.php'] = '<?php echo "This is b\n"; ?>'; 17$files['b/c.php'] = '<?php echo "This is b/c\n"; ?>'; 18include 'files/phar_test.inc'; 19 20$fp = fopen($pname . '/b/c.php', 'wb'); 21fwrite($fp, 'extra'); 22fclose($fp); 23include $pname . '/b/c.php'; 24?> 25 26--CLEAN-- 27<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> 28--EXPECT-- 29extra 30