blob: 345e0065c2970322effdd5a04fdb2f1b838efada (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
--TEST--
Generators must return a valid variable with return type specified
--FILE--
<?php
$gen = (function (): Generator {
1 + $a = 1; // force a temporary
return true;
yield;
})();
var_dump($gen->valid());
var_dump($gen->getReturn());
?>
--EXPECT--
bool(false)
bool(true)
|