--TEST-- Phar::isWriteable --SKIPIF-- --INI-- phar.readonly=0 phar.require_hash=0 --FILE-- '; $files = array(); $files['a.php'] = ''; $files['dir/'] = ''; $hasdir = 1; include 'files/phar_test.inc'; $a = new Phar($fname); $b = new PharData($fname2); $b['test'] = 'hi'; var_dump($a['a.php']->isWritable()); var_dump($a['a.php']->isReadable()); $a['a.php']->chmod(000); var_dump($a['a.php']->isWritable()); var_dump($a['a.php']->isReadable()); $a['a.php']->chmod(0666); var_dump($a['a.php']->isWritable()); var_dump($a['a.php']->isReadable()); ini_set('phar.readonly',1); clearstatcache(); var_dump($a['a.php']->isWritable()); var_dump($a['a.php']->isReadable()); ini_set('phar.readonly',0); clearstatcache(); var_dump($a['a.php']->isWritable()); var_dump($a['a.php']->isReadable()); ?> archive isWritable()); clearstatcache(); var_dump($a->isWritable()); var_dump($b->isWritable()); ini_set('phar.readonly',1); clearstatcache(); var_dump($a->isWritable()); var_dump($b->isWritable()); chmod($fname2, 000); clearstatcache(); var_dump($a->isWritable()); var_dump($b->isWritable()); chmod($fname2, 0666); ?> --CLEAN-- --EXPECT-- bool(true) bool(true) bool(false) bool(false) bool(true) bool(true) bool(false) bool(true) bool(true) bool(true) archive bool(true) bool(true) bool(true) bool(false) bool(true) bool(false) bool(false)