1--TEST--
2Exception in stream wrapper + __call
3--FILE--
4<?php
5
6class Loader {
7    public $context;
8    function stream_open() {
9        return true;
10    }
11    function stream_read() {
12        echo "stream_read\n";
13        throw new Exception("Message");
14    }
15    function __call($m, $a) {
16        echo "$m\n";
17    }
18}
19
20stream_wrapper_register('abc', 'Loader');
21try {
22    require 'abc://';
23} catch (Exception $e) {
24    echo $e->getMessage(), "\n";
25}
26
27?>
28--EXPECT--
29stream_set_option
30stream_stat
31stream_read
32Message
33