summaryrefslogtreecommitdiff
path: root/Zend/tests/bug70397.phpt
blob: fdfb1d43637b2f13b06d0173a83c39438bac9b7d (plain)
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)