Searched refs:yield (Results 1 – 25 of 264) sorted by relevance
1234567891011
/PHP-8.1/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 | exception_during_shutdown.phpt | 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"; 24 before yield 25 before yield in finally 27 Fatal error: Uncaught Error: Cannot yield from finally in a force-closed generator in %s:%d
|
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 | generator_with_arg_unpacking.phpt | 5 (function() { yield; })(...range(1, 16384)); 6 call_user_func_array(function() { yield; }, range(1, 16384)); 7 $g = (function() { yield; })(...range(1, 16384)); 8 $g = call_user_func_array(function() { yield; }, range(1, 16384));
|
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 | gh11028_1.phpt | 7 yield $x => 0; 14 echo "yield $msg\n"; 28 yield null 30 yield false 32 yield true 34 yield object
|
/PHP-8.1/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-8.1/Zend/tests/ |
H A D | bug69989_3.phpt | 8 yield; 16 $$varName = yield; 17 yield; 26 $var = yield; 27 yield; 34 yield from yield;
|
H A D | bug69989_2.phpt | 8 $gen = yield; 9 yield; 19 yield; 28 yield; 33 yield from [yield];
|
H A D | gh9916-011.phpt | 7 print "Before yield\n"; 10 print "Before yield 2\n"; 11 yield; 15 yield; 18 yield from $from; 37 Before yield 38 Before yield 2
|
H A D | gh9916-010.phpt | 7 print "Before yield\n"; 8 yield from (function () { 10 print "Before yield 2\n"; 11 yield; 30 Before yield 31 Before yield 2
|
/PHP-8.1/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-8.1/Zend/tests/return_types/ |
H A D | generators001.phpt | 6 yield 1; 10 yield 2; 14 yield 3; 18 yield 4; 22 yield 5; 26 yield 6;
|
/PHP-8.1/Zend/tests/generators/finally/ |
H A D | yield_yield.phpt | 2 Try { yield } finally { yield } 9 yield "2"; 13 yield "5";
|
/PHP-8.1/ext/zend_test/tests/ |
H A D | observer_generator_03.phpt | 2 Observer: Generator with 'yield from' 14 yield $i; 19 yield 0; 20 yield 1; 21 yield from barResults(); 22 yield 42;
|
Completed in 30 milliseconds
1234567891011