6 function __construct() {
7 $this->idx
= self
::$x++
;
8 printf("logger %d constructing\n", $this->idx
);
23 function unusedarg($x, $y) {
25 yield darray
['x' => $x, 'z' => $z];
29 yield darray
['foo' => $foo, 's' => $s];
30 yield darray
['x' => $x, 'y' => $y, 'foo' => $foo, 'z' => $z];
33 function dumpgen($g) {
39 function getargs(...$args) {
46 throw new Exception();
50 function manylocals() {
63 $a = yield darray
['a' => $a, 'b' => $b, 'c' => $c, 'd' => $d, 'e' => $e, 'f' => $f, 'g' => $g, 'h' => $h, 'i' => $i, 'j' => $j, 'k' => $k, 'l' => $l];
65 $c = yield darray
['a' => $a, 'b' => $b, 'c' => $c, 'd' => $d, 'e' => $e, 'f' => $f, 'g' => $g, 'h' => $h, 'i' => $i, 'j' => $j, 'k' => $k, 'l' => $l];
67 yield darray
['a' => $a, 'b' => $b, 'c' => $c, 'd' => $d, 'e' => $e, 'f' => $f, 'g' => $g, 'h' => $h, 'i' => $i, 'j' => $j, 'k' => $k, 'l' => $l];
70 <<__EntryPoint
>> function main(): void
{
72 dumpgen(unusedarg(new logger(), 5));
73 dumpgen(getargs(1, 2, 3, 4, 5));
77 } catch (Exception
$e) {}
80 } catch (Exception
$e) {
81 var_dump($e->getMessage());
86 var_dump($g->current());
87 $g->send(new stdclass
);
88 var_dump($g->current());
90 var_dump($g->current());
92 var_dump($g->current());
93 var_dump($g->valid());