mirror of
https://github.com/php/php-src.git
synced 2024-12-19 06:50:17 +08:00
23 lines
308 B
PHP
23 lines
308 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--
|
|
Closure object cannot have properties
|