1Yield 2----- 3<?php 4 5function gen() 6{ 7 yield; 8 yield $a; 9 yield $a => $b; 10 $a = yield; 11 $a = yield $b; 12 $a = yield $b => $c; 13 yield from $a; 14 $a = yield from $b; 15 (yield $a) + $b; 16 (yield from $a) + $b; 17 [yield $a => $b]; 18 [(yield $a) => $b]; 19 [$a + (yield $b) => $c]; 20 yield yield $a => $b; 21 yield (yield $a) => $b; 22 match ($x) { 23 yield $a, (yield $b) => $c, 24 }; 25 yield -$a; 26 (yield) - $a; 27 yield * $a; 28} 29----- 30function gen() 31{ 32 yield; 33 yield $a; 34 yield $a => $b; 35 $a = yield; 36 $a = yield $b; 37 $a = yield $b => $c; 38 yield from $a; 39 $a = yield from $b; 40 (yield $a) + $b; 41 (yield from $a) + $b; 42 [yield $a => $b]; 43 [(yield $a) => $b]; 44 [$a + (yield $b) => $c]; 45 yield yield $a => $b; 46 yield (yield $a) => $b; 47 match ($x) { 48 yield $a, (yield $b) => $c, 49 }; 50 yield -$a; 51 (yield) - $a; 52 (yield) * $a; 53} 54----- 55<?php 56 57function gen() 58{ 59 yield; 60 yield $a; 61 yield $a => $b; 62 $a = yield; 63 $a = yield $b; 64 $a = yield $b => $c; 65 yield from $a; 66 $a = yield from $b; 67 (yield $a) + $b; 68 (yield from $a) + $b; 69 [yield $a => $b]; 70 [(yield $a) => $b]; 71 [$a + (yield $b) => $c]; 72 yield yield $a => $b; 73 yield (yield $a) => $b; 74 match ($x) { 75 yield $a, (yield $b) => $c, 76 }; 77 yield -$a; 78 (yield) - $a; 79 yield * $a; 80} 81----- 82!!version=5.6,parserVersion=8.0 83function gen() 84{ 85 yield; 86 (yield $a); 87 (yield $a => $b); 88 $a = yield; 89 $a = (yield $b); 90 $a = (yield $b => $c); 91 yield from $a; 92 $a = yield from $b; 93 (yield $a) + $b; 94 (yield from $a) + $b; 95 [(yield $a => $b)]; 96 [(yield $a) => $b]; 97 [$a + (yield $b) => $c]; 98 (yield (yield $a => $b)); 99 (yield (yield $a) => $b); 100 match ($x) { 101 (yield $a), (yield $b) => $c, 102 }; 103 (yield -$a); 104 (yield) - $a; 105 (yield) * $a; 106} 107