xref: /PHP-8.1/Zend/tests/bug70397.phpt (revision 50d6fd6a)
1--TEST--
2Bug #70397 (Segmentation fault when using Closure::call and yield)
3--FILE--
4<?php
5
6$f = function () {
7    $this->value = true;
8    yield $this->value;
9};
10
11var_dump($f->call(new class {})->current());
12
13?>
14--EXPECT--
15bool(true)
16