1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
--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 {})->current()); ?> --EXPECT-- bool(true)