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