dis-bench / src /php /php-src /Zend /tests /generators /dynamic_properties.phpt
meddyrat's picture
Replace repository contents with the original corrected artifact
1e94262
Raw History Blame Contribute Delete
288 Bytes
--TEST--
It's not possible to assign dynamic properties on a generator
--FILE--
<?php
function gen() {
yield;
}
$gen = gen();
try {
$gen->prop = new stdClass;
} catch (Error $e) {
echo $e->getMessage(), "\n";
}
?>
--EXPECT--
Cannot create dynamic property Generator::$prop