Home
last modified time | relevance | path

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

1234

/PHP-7.0/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 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 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 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()
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 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 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 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 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 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");
H A Dmutli_yield_from_with_exception.phpt10 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))
H A Dgenerator_throwing_exception.phpt6 function gen() {
12 $gen = gen();
14 var_dump($gen->current());
17 $gen->next();
22 var_dump($gen->current());
H A Dyield_array_key.phpt6 function gen() {
10 $gen = gen();
11 var_dump($gen->key());
12 var_dump($gen->current());
H A Dyield_unary_precedence.phpt5 function gen() {
11 for ($gen = gen(); $gen->valid(); $gen->send(1)) {
13 var_dump($gen->current());
H A Dsend_after_close.phpt6 function gen() { var_dump(yield); }
8 $gen = gen();
9 $gen->send('foo');
10 $gen->send('bar');
H A Dgenerator_throwing_during_function_call.phpt10 function gen() {
16 $gen = gen();
18 var_dump($gen->current());
21 $gen->next();
26 var_dump($gen->current());
H A Ddangling_send_target.phpt9 $gen = gen1();
10 $gen->send(new stdClass);
16 $gen = gen2();
17 $gen->send(new stdClass);
18 $gen->send(new stdClass);
H A Dget_return_errors.phpt12 $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();
H A Dbug70965.phpt14 $gen = it();
15 $gens[] = bar($gen);
16 $gens[] = bar($gen);
21 $gen->next();
23 } while ($gen->valid());
/PHP-7.0/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()
/PHP-7.0/Zend/tests/
H A Dbug69989_1.phpt6 function gen() {
9 $gen = gen();
10 $gen->send($gen);
H A Dbug71980.phpt30 $gen = gen1();
31 $gen->rewind();
32 unset($gen);
34 $gen = gen2();
35 $gen->rewind();
36 unset($gen);
/PHP-7.0/Zend/tests/generators/finally/
H A Drun_on_dtor.phpt6 function gen() {
14 $gen = gen();
15 $gen->rewind();
17 set_error_handler(function() use($gen) {});

Completed in 27 milliseconds

1234