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