mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
008bfcc7ba
Instead of manually implementing this, use the standard mechanism. This has minor behavior changes (e.g. doing an isset() will now return false instead of throwing) which are more in line with typical behavior.
23 lines
313 B
PHP
23 lines
313 B
PHP
--TEST--
|
|
Cannot write to closure properties
|
|
--FILE--
|
|
<?php
|
|
|
|
class A {
|
|
function getFn() {
|
|
return function() {
|
|
};
|
|
}
|
|
}
|
|
|
|
$a = new A;
|
|
try {
|
|
$c = $a->getFn()->b = new stdClass;
|
|
} catch (Error $e) {
|
|
echo $e->getMessage(), "\n";
|
|
}
|
|
|
|
?>
|
|
--EXPECT--
|
|
Cannot create dynamic property Closure::$b
|