mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
902d64390e
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
18 lines
255 B
PHP
18 lines
255 B
PHP
--TEST--
|
|
Bug #70397 (Segmentation fault when using Closure::call and yield)
|
|
--FILE--
|
|
<?php
|
|
|
|
$f = function () {
|
|
$this->value = true;
|
|
yield $this->value;
|
|
};
|
|
|
|
var_dump($f->call(new class {
|
|
public $value;
|
|
})->current());
|
|
|
|
?>
|
|
--EXPECT--
|
|
bool(true)
|