Home
last modified time | relevance | path

Searched refs:gen (Results 1 – 25 of 162) sorted by relevance

1234567

/PHP-8.1/Zend/tests/generators/
H A Dget_return.phpt11 $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 …]
H A Dyield_from_backtrace.phpt10 function gen() {
19 foreach (gen() as $v) {
24 for ($gen = gen(); $gen->valid(); $gen->next()) {
25 var_dump($gen->current());
31 #0 %s(%d): gen()
34 #1 %s(%d): gen()
36 #0 %s(%d): gen()
40 #0 [internal function]: gen()
44 #1 [internal function]: gen()
47 #0 [internal function]: gen()
H A Dbasic_yield_from_proxying.phpt10 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"
H A Dbug80240.phpt6 function gen() {
8 yield from gen();
11 function bar($gen) {
12 yield from $gen;
15 $gen = gen();
16 $a = bar($gen);
17 $b = bar($gen);
21 unset($gen);
H A Dyield_during_method_call.phpt12 function gen() {
17 $gen = gen();
18 $gen->send('foo');
21 $gen = gen();
22 $gen->rewind();
23 unset($gen);
H A Dget_return_types.phpt11 $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());
H A Dgenerator_rewind.phpt6 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 …]
H A Dgc_with_iterator_in_foreach.phpt6 function gen($iter, &$gen) {
13 $gen = gen($iter, $gen);
14 $gen->next();
15 unset($gen);
H A Dyield_from_multi_tree_exception.phpt15 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 …]
H A Dmultiple_yield_from_on_same_generator.phpt6 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);
H A Drepeated_yield_from_with_immediate_release.phpt6 function gen() {
9 function yield_from($gen) {
10 yield from $gen;
12 $gen = gen();
13 var_dump(yield_from($gen)->current());
14 var_dump(yield_from($gen)->current());
H A Dbug74954.phpt11 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))
H A Dbasic_yield_from_exception_handling.phpt12 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()
H A Dthrow_already_closed.phpt6 function gen() {
10 $gen = gen();
11 $gen->next();
12 $gen->next();
13 var_dump($gen->valid());
14 $gen->throw(new Exception('test'));
H A Dgh9750-010.phpt15 $gen = function ($c) use (&$gen) {
16 $gen->valid(yield);
19 $gen = $gen(new C());
21 foreach ($gen as $value) {
25 $gen = null;
H A Dgh9750-001.phpt15 $gen = function ($c) use (&$gen) {
16 f($gen, yield);
19 $gen = $gen(new C());
21 foreach ($gen as $value) {
25 $gen = null;
H A Dgh9750-002.phpt15 $gen = function ($c) use (&$gen) {
16 f($gen, f(yield));
19 $gen = $gen(new C());
21 foreach ($gen as $value) {
25 $gen = null;
H A Dgh9750-003.phpt15 $gen = function ($c) use (&$gen) {
16 f(f($gen, yield));
19 $gen = $gen(new C());
21 foreach ($gen as $value) {
25 $gen = null;
H A Dgh9750-004.phpt15 $gen = function ($c) use (&$gen) {
16 f(new stdClass, $gen, yield);
19 $gen = $gen(new C());
21 foreach ($gen as $value) {
25 $gen = null;
H A Dgenerator_send.phpt6 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");
/PHP-8.1/Zend/tests/
H A Dbug76946.phpt6 function gen() {
7 $gen = yield;
8 foreach ([1, $gen] as $v) {
14 $gen = yield;
15 $gen + yield;
18 $gen = gen();
19 $gen->send($gen);
H A Dbug69989_3.phpt11 $obj->gen = gen1($obj);
19 $gen = gen2();
20 $gen->send($gen);
29 $gen = gen3();
30 $gen->send($gen);
36 $gen = gen4();
37 $gen2 = gen4($gen);
39 $gen->send($gen2);
H A Dbug69989_2.phpt8 $gen = yield;
12 $gen = gen1();
13 $gen->send($gen);
17 public $gen;
24 $test->gen = $test->gen2();
36 $gen = gen4();
37 $gen->send($gen);
H A Dbug78752.phpt6 function gen(&$gen) {
14 $gen = gen($gen);
15 var_dump($gen->current());
20 $gen->next();
/PHP-8.1/Zend/tests/generators/errors/
H A Dresume_running_generator_error.phpt6 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()

Completed in 21 milliseconds

1234567