--TEST-- Phar::chmod zip-based --SKIPIF-- --INI-- phar.readonly=0 phar.require_hash=0 --FILE-- '; $phar->setAlias('hio'); $phar->addEmptyDir('test'); $phar->stopBuffering(); ini_set('phar.readonly', 1); try { var_dump($phar['a.php']->isExecutable()); $phar['a.php']->chmod(0777); var_dump($phar['a.php']->isExecutable()); $phar['a.php']->chmod(0666); var_dump($phar['a.php']->isExecutable()); echo "test dir\n"; var_dump($phar['test']->isExecutable()); $phar['test']->chmod(0777); var_dump($phar['test']->isExecutable()); $phar['test']->chmod(0666); var_dump($phar['test']->isExecutable()); } catch (Exception $e) { echo $e->getMessage() . "\n"; } ?> --CLEAN-- --EXPECTF-- bool(false) Cannot modify permissions for file "a.php" in phar "%sa.phar.zip", write operations are prohibited