--TEST-- Phar::chmod --EXTENSIONS-- phar --INI-- phar.readonly=1 phar.require_hash=0 --SKIPIF-- --FILE-- '; $files = array(); $files['a.php'] = ''; include 'files/phar_test.inc'; try { $a = new Phar($fname); var_dump($a['a.php']->isExecutable()); $a['a.php']->chmod(0777); var_dump($a['a.php']->isExecutable()); $a['a.php']->chmod(0666); var_dump($a['a.php']->isExecutable()); } catch (Exception $e) { echo $e->getMessage() . "\n"; } ?> --CLEAN-- --EXPECTF-- bool(false) Cannot modify permissions for file "a.php" in phar "%s033a.1.phar.php", write operations are prohibited