Searched refs:yield (Results 1 – 25 of 154) sorted by relevance
1234567
/PHP-7.0/Zend/tests/generators/ |
H A D | yield_in_parenthesis.phpt | 2 No additional parenthesis are required around yield if they are already present 7 if (yield $foo); elseif (yield $foo); 8 if (yield $foo): elseif (yield $foo): endif; 9 while (yield $foo); 10 do {} while (yield $foo); 11 switch (yield $foo) {} 12 (yield $foo); 13 die(yield $foo); 14 func(yield $foo); 15 $foo->func(yield $foo); [all …]
|
H A D | yield_precedence.phpt | 2 Precedence of yield and arrow operators 7 yield "a" . "b"; 8 yield "a" or die; 9 yield "k" => "a" . "b"; 10 yield "k" => "a" or die; 11 var_dump([yield "k" => "a" . "b"]); 12 yield yield "k1" => yield "k2" => "a" . "b"; 13 yield yield "k1" => (yield "k2") => "a" . "b"; 14 var_dump([yield "k1" => yield "k2" => "a" . "b"]); 15 var_dump([yield "k1" => (yield "k2") => "a" . "b"]);
|
H A D | generator_rewind.phpt | 2 A generator can only be rewinded before or at the first yield 7 echo "before yield\n"; 8 yield; 9 echo "after yield\n"; 10 yield; 26 yield $foo; 27 yield $foo; 41 if (false) yield; 49 before yield 50 after yield
|
H A D | recursive_yield_from.phpt | 2 Check if recursion with yield from works 7 yield 1 + $a; 9 yield from from($a + 3); 10 yield from from($a + 6); 12 yield 2 + $a; 16 yield from from();
|
H A D | generator_send.phpt | 7 var_dump(yield "yield foo"); 8 var_dump(yield "yield bar"); 19 string(9) "yield foo" 21 string(9) "yield bar"
|
H A D | yield_in_finally.phpt | 2 yield can be used in finally (apart from forced closes) 12 echo "before yield\n"; 13 yield "yielded value"; 14 echo "after yield\n"; 27 before yield 29 after yield
|
H A D | yield_from_array.phpt | 6 yield 0; 7 yield from []; // must not yield anything 8 yield from [1,2]; 12 yield from from();
|
H A D | basic_yield_from_proxying.phpt | 2 Basic test if yield from works 6 yield "from" => 1; 7 yield 2; 11 yield "gen" => 0; 12 yield from from(); 13 yield 3;
|
H A D | yield_from_deep_recursion.phpt | 2 Deep recursion with yield from 8 yield $i; 13 yield from gen(++$i); 15 yield $i; 16 yield from from(++$i);
|
H A D | generator_with_nonscalar_keys.phpt | 7 yield [1, 2, 3] => [4, 5, 6]; 8 yield (object) ['a' => 'b'] => (object) ['b' => 'a']; 9 yield 3.14 => 2.73; 10 yield false => true; 11 yield true => false; 12 yield null => null;
|
H A D | multiple_yield_from_on_same_generator.phpt | 2 Multiple yield from on a same Generator instance 7 yield 1 + $a; 9 var_dump(yield from gen($a + 1)); 11 yield 3 + $a; 16 var_dump(yield from $gen); 19 /* Twice a Generator from bar() using yield from on $gen */
|
H A D | yield_from_iterator.phpt | 2 yield from with an (Array)Iterator 6 yield 1; 7 yield from new ArrayIterator([2, 3, 4]); 8 yield 5;
|
H A D | yield_from_greedy_parse.phpt | 2 yield from parses too greedily 11 yield 24; 15 yield from1234(42); 16 yield from(bar());
|
H A D | auto_incrementing_keys.phpt | 7 yield 'foo'; 8 yield 'bar'; 9 yield 5 => 'rab'; 10 yield 'oof';
|
H A D | yield_from_force_closed.phpt | 2 Cannot "yield from" from force closed generator 8 yield 1; 14 yield from gen1(); 17 yield from gen1(); 34 Error: Cannot use "yield from" in a force-closed generator in %s:%d
|
H A D | dangling_send_target.phpt | 6 yield from [yield]; 13 $x = yield; 14 yield from [1, 2, 3];
|
H A D | get_return_types.phpt | 8 yield; 16 yield; 24 yield; 32 yield; 40 yield;
|
H A D | generator_in_multipleiterator.phpt | 7 yield 'a'; 8 yield 'aa'; 12 yield 'b'; 13 yield 'bb';
|
H A D | generator_return_without_value.phpt | 7 yield; 12 yield; 18 yield; 23 yield;
|
H A D | throw_caught.phpt | 7 echo "before yield\n"; 9 yield; 14 yield 'result'; 22 before yield
|
H A D | yield_unary_precedence.phpt | 2 When + or - are used on yield, they must be unary (and not binary) (Bug #69160) 6 var_dump(yield +1); 7 var_dump(yield -1); 8 var_dump(yield * -1); // other ops still should behave normally
|
H A D | get_return.phpt | 8 yield 24; 16 yield 24; 25 // & for generators specifies by-reference yield, not return 29 yield $var; 41 yield 24; 52 yield 24; 64 yield 24;
|
/PHP-7.0/Zend/tests/generators/errors/ |
H A D | yield_in_force_closed_finally_error.phpt | 2 yield cannot be used in a finally block when the generator is force-closed 8 echo "before yield\n"; 9 yield; 10 echo "after yield\n"; 12 echo "before yield in finally\n"; 13 yield; 14 echo "after yield in finally\n"; 26 before yield 27 before yield in finally 29 Fatal error: Uncaught Error: Cannot yield from finally in a force-closed generator in %s:%d
|
/PHP-7.0/ext/spl/tests/ |
H A D | iterator_to_array_nonscalar_keys.phpt | 7 yield "foo" => 0; 8 yield 1 => 1; 9 yield 2.5 => 2; 10 yield null => 3; 11 yield [] => 4; 12 yield new stdClass => 5;
|
/PHP-7.0/Zend/tests/generators/finally/ |
H A D | yield_yield.phpt | 2 Try { yield } finally { yield } 9 yield "2"; 13 yield "5";
|
Completed in 33 milliseconds
1234567