1--TEST--
2Phar: copy-on-write test 10 [cache_list]
3--INI--
4default_charset=UTF-8
5phar.cache_list={PWD}/copyonwrite10.phar.php
6phar.readonly=0
7--EXTENSIONS--
8phar
9--FILE_EXTERNAL--
10files/write10.phar
11--EXPECTF--
12string(214) "<?php
13$p = new Phar(__FILE__);
14var_dump($p->getStub());
15$p2 = new Phar(__FILE__);
16$a = fopen("phar://" . __FILE__ . "/test.txt", "r");
17$p->setStub($a);
18echo $p2->getStub(),"\n";
19echo "ok\n";
20__HALT_COMPILER(); ?>
21"
22
23Deprecated: Calling Phar::setStub(resource $stub, int $length) is deprecated in %s on line %d
24<?php __HALT_COMPILER(); ?>
25
26ok
27