1--TEST-- 2stream_wrapper_unregister() & stream_wrapper_restore() 3--FILE-- 4<?php 5 6var_dump(stream_wrapper_unregister('file')); 7var_dump(fopen("file://".__FILE__, "r")); 8var_dump(stream_wrapper_restore('file')); 9var_dump(fopen("file://".__FILE__, "r")); 10 11echo "Done\n"; 12?> 13--EXPECTF-- 14bool(true) 15 16Warning: fopen(): Unable to find the wrapper "file" - did you forget to enable it when you configured PHP? in %s on line %d 17 18Warning: fopen(): file:// wrapper is disabled in the server configuration in %s on line %d 19 20Warning: fopen(file://%s): failed to open stream: no suitable wrapper could be found in %s on line %d 21bool(false) 22bool(true) 23resource(%d) of type (stream) 24Done 25