1--TEST-- 2Stats executed during include path resolution should be silent 3--FILE-- 4<?php 5 6class StreamWrapper { 7 public $context; 8 public function url_stat($path, $flags) { 9 $path = str_replace('test://', 'file://', $path); 10 if ($flags & STREAM_URL_STAT_QUIET) { 11 return @stat($path); 12 } else { 13 return stat($path); 14 } 15 } 16} 17 18stream_wrapper_register('test', StreamWrapper::class); 19set_include_path('test://foo:test://bar'); 20 21try { 22 require_once 'doesnt_exist.php'; 23} catch (Exception $e) { 24 echo $e->getMessage(), "\n"; 25} 26 27?> 28--EXPECTF-- 29Warning: require_once(doesnt_exist.php): Failed to open stream: No such file or directory in %s on line %d 30 31Fatal error: Uncaught Error: Failed opening required 'doesnt_exist.php' (include_path='test://foo:test://bar') in %s:%d 32Stack trace: 33#0 {main} 34 thrown in %s on line %d 35