--- /dev/null
+--TEST--
+Phar: copy-on-write test 25 [cache_list]
+--INI--
+default_charset=UTF-8
+phar.cache_list={PWD}/copyonwrite25.phar.php
+phar.readonly=0
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("zlib")) die("skip no zlib extension"); ?>
+--FILE_EXTERNAL--
+files/write25.phar
+--EXPECTF--
+bool(false)
+bool(true)
+<?php __HALT_COMPILER();
+ok
\ No newline at end of file
--- /dev/null
+<?php
+
+$fname = dirname(__FILE__) . '/write25.phar';
+@unlink($fname);
+
+$phar = new Phar($fname);
+$phar->setStub('<?php
+$p = new Phar(__FILE__);
+var_dump(isset($p["mounted"]));
+Phar::mount("mounted", "phar://" . __FILE__ . "/test.txt");
+var_dump(isset($p["mounted"]));
+echo $p["mounted"]->getContent(),"\nok\n";
+__HALT_COMPILER();
+?>');
+$phar['test.txt'] = "<?php __HALT"."_COMPILER();";
+?>