/php-src/Zend/ |
H A D | zend_generators.c | 364 if (generator->func && (generator->func->common.fn_flags & ZEND_ACC_CLOSURE)) { in zend_generator_free_storage() 492 generator = generator->node.parent; in zend_generator_check_placeholder_frame() 585 generator = generator->node.parent; in get_new_root() 588 return generator; in get_new_root() 828 zend_observer_fcall_end(generator->execute_data, &generator->value); in zend_generator_resume() 866 …if (UNEXPECTED((generator != orig_generator && !Z_ISUNDEF(generator->retval)) || (generator->execu… in zend_generator_resume() 877 …if (UNEXPECTED(Z_TYPE(generator->value) == IS_UNDEF) && EXPECTED(generator->execute_data) && EXPEC… in zend_generator_ensure_initialized() 897 zend_generator *generator; in ZEND_METHOD() local 910 zend_generator *generator; in ZEND_METHOD() local 963 zend_generator *generator; in ZEND_METHOD() local [all …]
|
H A D | zend_generators.h | 106 ZEND_API void zend_generator_close(zend_generator *generator, bool finished_execution); 107 ZEND_API void zend_generator_resume(zend_generator *generator); 109 ZEND_API void zend_generator_restore_call_stack(zend_generator *generator); 112 void zend_generator_yield_from(zend_generator *generator, zend_generator *from); 115 ZEND_API zend_generator *zend_generator_update_current(zend_generator *generator); 116 ZEND_API zend_generator *zend_generator_update_root(zend_generator *generator); 119 if (EXPECTED(generator->node.parent == NULL)) { in zend_generator_get_current() 121 return generator; in zend_generator_get_current() 124 zend_generator *root = generator->node.ptr.root; in zend_generator_get_current() 126 root = zend_generator_update_root(generator); in zend_generator_get_current() [all …]
|
/php-src/Zend/tests/generators/ |
H A D | bug78434.phpt | 11 $generator = $function(); 12 $generator->valid(); 13 yield from $generator; 15 $generator = $function(); 16 $generator->valid(); 17 yield from $generator;
|
H A D | generator_returns_generator.phpt | 2 A generator function returns a Generator object 9 // trigger a generator 13 $generator = gen(); 14 var_dump($generator instanceof Generator);
|
H A D | generator_closure_collection.phpt | 2 The Closure object of a generator is freed when the generator is freed. 13 $generator = $genFactory(); 18 foreach ($generator as $value) var_dump($value); 22 unset($generator);
|
H A D | generator_rewind.phpt | 2 A generator can only be rewinded before or at the first yield 39 echo "in generator\n"; 52 Exception: Cannot rewind a generator that was already run in %s:%d 57 Exception: Cannot traverse an already closed generator in %s:%d 61 in generator
|
H A D | nested_calls_with_die.phpt | 2 Test nested calls with die() in a generator 8 yield; // force generator 22 yield; // force generator
|
H A D | bug71601.phpt | 25 $generator = gen2(); 27 var_dump($generator->current()); 29 unset($generator);
|
H A D | func_get_args.phpt | 2 func_get_args() can be used inside generator functions 8 yield; // trigger generator
|
H A D | bug66041.phpt | 13 $generator = dumpElement(); 14 $generator->send($fixedArray);
|
H A D | gh11028_3.phpt | 5 function generator() { 15 var_dump([...generator()]);
|
H A D | repeated_yield_from_with_immediate_release.phpt | 2 A generator can be yielded from multiple times, testing immediate release of the yield from'ing gen…
|
H A D | backtrace.phpt | 2 Printing the stack trace in a generator 12 yield; // force generator
|
H A D | yield_from_force_closed.phpt | 2 Cannot "yield from" from force closed generator 34 Error: Cannot use "yield from" in a force-closed generator in %s:%d
|
/php-src/Zend/tests/ |
H A D | bug79927.phpt | 6 $generator = (function () { 10 $generator->next(); 11 $generator->next(); 13 $generator->rewind(); 17 echo $generator->current(), "\n"; 29 Cannot rewind a generator that was already run
|
H A D | bug62991.phpt | 2 Bug #62991 (Segfault with generator and closure) 24 $generator = test(array( 1, 2, 3 ) ); 25 foreach($generator as $something) { 28 $generator = test2(array( 1, 2, 3 ) ); 29 foreach($generator() as $something) { 33 $generator = test2(array( 1, 2, 3 ) );
|
/php-src/ext/spl/tests/ |
H A D | bug72684.phpt | 2 Bug #72684 (AppendIterator segfault with closed generator) 7 $generator = createGenerator(); 10 $appendIterator->append($generator); 21 Cannot traverse an already closed generator
|
H A D | iterator_count_exception.phpt | 6 function generator() { 11 var_dump(iterator_count(generator())); 17 #0 [internal function]: generator()
|
/php-src/ext/zend_test/tests/ |
H A D | observer_generator_04.phpt | 13 echo 'Starting generator' . PHP_EOL; 21 $generator = fooResults(); 23 while($generator->current() !== NULL) { 24 echo $generator->current() . PHP_EOL; 25 if ($generator->current() === 5) { 26 $generator->send('Boop'); 28 $generator->next(); 45 Starting generator
|
H A D | observer_generator_01.phpt | 2 Observer: Basic generator observability 19 $generator = getResults(); 20 foreach ($generator as $value) {
|
H A D | observer_generator_02.phpt | 20 $generator = getResults(); 21 foreach ($generator as $value) { 24 echo $generator->getReturn() . PHP_EOL;
|
/php-src/ext/reflection/tests/ |
H A D | bug64007.phpt | 7 $generator = $reflection->newInstanceWithoutConstructor(); 8 var_dump($generator); 13 $generator = $reflection->newInstance(); 14 var_dump($generator);
|
/php-src/Zend/tests/generators/errors/ |
H A D | resume_running_generator_error.phpt | 2 It is not possible to resume an already running generator 22 Exception: Cannot resume an already running generator 24 Fatal error: Uncaught Error: Cannot resume an already running generator in %s:%d
|
H A D | resume_running_generator_error_002.phpt | 2 Memory leak when resume an already running generator 17 Cannot resume an already running generator
|
/php-src/Zend/tests/generators/finally/ |
H A D | return_return.phpt | 2 try { return } finally { return } in generator 23 yield; // force generator
|