php-src/Zend/tests/closure_write_prop.phpt

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