1--TEST-- 2Bug #76943 (Inconsistent stream_wrapper_restore() errors) 3--SKIPIF-- 4<?php 5if (!in_array('phar', stream_get_wrappers())) die('skip phar wrapper not registered'); 6?> 7--FILE-- 8<?php 9var_dump(stream_wrapper_restore('foo')); 10var_dump(stream_wrapper_restore('phar')); 11 12stream_wrapper_register('bar', 'stdClass'); 13 14var_dump(stream_wrapper_restore('foo')); 15var_dump(stream_wrapper_restore('phar')); 16?> 17--EXPECTF-- 18Warning: stream_wrapper_restore(): foo:// never existed, nothing to restore in %s on line %d 19bool(false) 20 21Notice: stream_wrapper_restore(): phar:// was never changed, nothing to restore in %s on line %d 22bool(true) 23 24Warning: stream_wrapper_restore(): foo:// never existed, nothing to restore in %s on line %d 25bool(false) 26 27Notice: stream_wrapper_restore(): phar:// was never changed, nothing to restore in %s on line %d 28bool(true) 29