Searched refs:gen (Results 1 – 25 of 93) sorted by relevance
1234
11 $gen = gen1();20 $gen = gen2();21 var_dump($gen->current());22 $gen->next();33 $gen = gen3();35 $gen->next();45 $gen = gen4();47 $gen->next();55 $gen = gen5();57 $gen->next();[all …]
10 function gen() {11 yield "gen" => 0;17 foreach (gen() as $k => $v) {22 for ($gen = gen(); $gen->valid(); $gen->next()) {23 var_dump($gen->key(), $gen->current());27 string(3) "gen"35 string(3) "gen"
10 function gen() {19 foreach (gen() as $v) {24 for ($gen = gen(); $gen->valid(); $gen->next()) {25 var_dump($gen->current());31 #0 gen() called at [%s:%d]34 #1 gen() called at [%s:%d]36 #0 gen() called at [%s:%d]40 #0 gen()44 #1 gen()47 #0 gen()
12 function gen() {17 $gen = gen();18 $gen->send('foo');21 $gen = gen();22 $gen->rewind();23 unset($gen);
11 $gen = gen1();12 var_dump($gen->getReturn());19 $gen = gen2();20 var_dump($gen->getReturn());27 $gen = gen3([1, 2, 3]);28 var_dump($gen->getReturn());35 $gen = gen4((object) ['prop' => 321]);36 var_dump($gen->getReturn());43 $gen = gen5("42");44 var_dump($gen->getReturn());
6 function gen() {13 $gen = gen();14 $gen->rewind();15 $gen->rewind();16 $gen->next();19 $gen->rewind();30 $gen = gen2();31 foreach ($gen as $v) { }33 foreach ($gen as $v) { }44 $gen = gen3();[all …]
15 function gen($gen, $level) {16 yield from $gen;34 foreach ($all as $gen) {35 var_dump($gen->current());36 $gen->next();37 if (!$gen->valid()) {43 unset($all[array_search($gen, $all)]);68 #1 %s(%d): gen(Object(Generator), 1)69 #2 %s(%d): gen(Object(Generator), 2)70 #3 [internal function]: gen(Object(Generator), 3)[all …]
6 function gen($a = 0) {9 var_dump(yield from gen($a + 1));15 function bar($gen) {16 var_dump(yield from $gen);19 /* Twice a Generator from bar() using yield from on $gen */20 $gen = gen();21 $gens[] = bar($gen);22 $gens[] = bar($gen);
12 function gen() {14 yield "gen" => 0;15 } catch (Exception $e) { print "catch in gen()\n$e\n"; }18 } catch (Exception $e) { print "catch in gen()\n$e\n"; }24 for ($gen = gen(); $gen->valid(); $gen->throw(new Exception((string) $i++))) {25 var_dump($gen->current());29 var_dump($gen->valid());34 catch in gen()44 catch in gen()
11 function gen($gen) {13 var_dump(yield from $gen);17 $gen = from();18 $gens[] = gen($gen);19 $gens[] = gen($gen);37 #1 [internal function]: gen(Object(Generator))43 #0 [internal function]: gen(Object(Generator))
6 function gen() {10 $gen = gen();11 $gen->next();12 $gen->next();13 var_dump($gen->valid());14 $gen->throw(new Exception('test'));
6 function gen() {11 $gen = gen();12 var_dump($gen->current());13 $gen->send("send bar");14 var_dump($gen->current());15 $gen->send("send foo");
10 function gen($gen) {12 var_dump(yield from $gen);16 $gen = from();17 $gens[] = gen($gen);18 $gens[] = gen($gen);39 #1 [internal function]: gen(Object(Generator))46 #0 [internal function]: gen(Object(Generator))
6 function gen() {12 $gen = gen();14 var_dump($gen->current());17 $gen->next();22 var_dump($gen->current());
6 function gen() {10 $gen = gen();11 var_dump($gen->key());12 var_dump($gen->current());
5 function gen() {11 for ($gen = gen(); $gen->valid(); $gen->send(1)) {13 var_dump($gen->current());
6 function gen() { var_dump(yield); }8 $gen = gen();9 $gen->send('foo');10 $gen->send('bar');
10 function gen() {16 $gen = gen();18 var_dump($gen->current());21 $gen->next();26 var_dump($gen->current());
9 $gen = gen1();10 $gen->send(new stdClass);16 $gen = gen2();17 $gen->send(new stdClass);18 $gen->send(new stdClass);
12 $gen = gen1();15 $gen->getReturn();26 $gen = gen2();28 $gen->next();34 $gen->getReturn();45 $gen = gen3();48 $gen->getReturn();58 $gen = gen4();60 $gen->throw(new Exception("gen4() throw"));67 $gen->getReturn();
14 $gen = it();15 $gens[] = bar($gen);16 $gens[] = bar($gen);21 $gen->next();23 } while ($gen->valid());
6 function gen() {7 $gen = yield;9 $gen->next();13 $gen->next();16 $gen = gen();17 $gen->send($gen);18 $gen->next();27 #1 [internal function]: gen()
6 function gen() {9 $gen = gen();10 $gen->send($gen);
30 $gen = gen1();31 $gen->rewind();32 unset($gen);34 $gen = gen2();35 $gen->rewind();36 unset($gen);
6 function gen() {14 $gen = gen();15 $gen->rewind();17 set_error_handler(function() use($gen) {});
Completed in 27 milliseconds