mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00

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
32 lines
514 B
PHP
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
|