1--TEST-- 2Phar object: add file 3--SKIPIF-- 4<?php if (!extension_loaded('phar')) die('skip'); ?> 5<?php if (!extension_loaded("spl")) die("skip SPL not available"); ?> 6--INI-- 7phar.readonly=1 8phar.require_hash=0 9--FILE-- 10<?php 11 12try 13{ 14 $pharconfig = 0; 15 16 require_once 'files/phar_oo_test.inc'; 17 18 $phar = new Phar($fname); 19 20 $phar['f.php'] = 'hi'; 21 var_dump(isset($phar['f.php'])); 22 echo $phar['f.php']; 23 echo "\n"; 24} 25catch (BadMethodCallException $e) 26{ 27 echo "Exception: " . $e->getMessage() . "\n"; 28} 29 30?> 31===DONE=== 32--CLEAN-- 33<?php 34unlink(dirname(__FILE__) . '/files/phar_oo_test.phar.php'); 35__halt_compiler(); 36?> 37--EXPECTF-- 38Exception: Write operations disabled by the php.ini setting phar.readonly 39===DONE=== 40