php-src/Zend/tests/exception_stream_wrapper.phpt
Nikita Popov 902d64390e Deprecate implicit dynamic properties
Writing to a proprety that hasn't been declared is deprecated,
unless the class uses the #[AllowDynamicProperties] attribute or
defines __get()/__set().

RFC: https://wiki.php.net/rfc/deprecate_dynamic_properties
2021-11-26 14:10:11 +01:00

32 lines
514 B
PHP

--TEST--
Exception in stream wrapper + __call
--FILE--
<?php
class Loader {
public $context;
function stream_open() {
return true;
}
function stream_read() {
echo "stream_read\n";
throw new Exception("Message");
}
function __call($m, $a) {
echo "$m\n";
}
}
stream_wrapper_register('abc', 'Loader');
try {
require 'abc://';
} catch (Exception $e) {
echo $e->getMessage(), "\n";
}
?>
--EXPECT--
stream_set_option
stream_stat
stream_read
Message