Home
last modified time | relevance | path

Searched refs:closure (Results 1 – 25 of 266) sorted by relevance

1234567891011

/php-src/Zend/
H A Dzend_closures.c126 zend_closure *closure; in ZEND_METHOD() local
166 GC_DELREF(&closure->std); in ZEND_METHOD()
494 return &closure->func; in zend_get_closure_method_def()
501 return &closure->this_ptr; in zend_get_closure_this_ptr()
540 zend_closure *closure; in zend_closure_new() local
557 closure->func.common.scope, closure->called_scope, &closure->this_ptr); in zend_closure_clone()
566 *fptr_ptr = &closure->func; in zend_closure_get_closure()
687 *table = Z_TYPE(closure->this_ptr) != IS_NULL ? &closure->this_ptr : NULL; in zend_closure_get_gc()
733 zend_closure *closure; in zend_create_closure_ex() local
810 closure->orig_internal_handler = closure->func.internal_function.handler; in zend_create_closure_ex()
[all …]
/php-src/ext/zend_test/tests/
H A Dobserver_closure_01.phpt31 <{closure:%s:%d}>
34 <{closure:%s:%d}>
42 </{closure:%s:%d}>
43 </{closure:%s:%d}>
44 <{closure:%s:%d}>
46 <{closure:%s:%d}>
52 </{closure:%s:%d}>
53 </{closure:%s:%d}>
54 <{closure:%s:%d}>
56 <{closure:%s:%d}>
[all …]
/php-src/ext/reflection/tests/
H A Dgh10623.phpt10 $closure = function($var) use($data1) {};
11 var_dump((new ReflectionFunction($closure))->getClosureUsedVariables());
13 $closure = function($var, ...$variadic) {};
14 var_dump((new ReflectionFunction($closure))->getClosureUsedVariables());
16 $closure = function($var, ...$variadic) use($data1) {};
17 var_dump((new ReflectionFunction($closure))->getClosureUsedVariables());
19 $closure = function($var, ...$variadic) use($data1, $data2, $data3) {};
20 var_dump((new ReflectionFunction($closure))->getClosureUsedVariables());
22 $closure = function(...$variadic) use($data1) {};
23 var_dump((new ReflectionFunction($closure))->getClosureUsedVariables());
[all …]
H A Dclosures_004.phpt2 Reflection on closures: Segfault with getClosure() on closure itself
5 $closure = function() { echo "Invoked!\n"; };
7 $method = new ReflectionFunction ($closure);
14 unset ($closure);
19 $closure = function() { echo "Invoked!\n"; };
21 $method = new ReflectionMethod ($closure, '__invoke');
22 $closure2 = $method->getClosure ($closure);
27 unset ($closure);
H A Dbug66430.phpt2 Bug #66430: ReflectionFunction::invoke does not invoke closure with object scope
21 $closure = $method->getClosure($alpha);
23 $reflectionC = new ReflectionFunction($closure);
26 echo "closure of alpha.bravo: ", $closure().PHP_EOL;
27 echo "call_user_func of closure: ", call_user_func($closure).PHP_EOL;
29 echo "closure cl of c(alpha.bravo): ", get_class($reflectionC->getClosureThis()).PHP_EOL;
37 closure of alpha.bravo: Valid representation
38 call_user_func of closure: Valid representation
40 closure cl of c(alpha.bravo): Alpha
H A Dclosures_001.phpt6 $closure = function($a, $b = 0) { };
8 $ro = new ReflectionObject($closure);
22 $rm = new ReflectionMethod($closure, '__invoke');
29 $rp = new ReflectionParameter(array($closure, '__invoke'), 0);
31 $rp = new ReflectionParameter(array($closure, '__invoke'), 1);
33 $rp = new ReflectionParameter(array($closure, '__invoke'), 'a');
35 $rp = new ReflectionParameter(array($closure, '__invoke'), 'b');
40 $rp = new ReflectionParameter($closure, 0);
42 $rp = new ReflectionParameter($closure, 1);
44 $rp = new ReflectionParameter($closure, 'a');
[all …]
H A DReflectionFunction_getClosureScopeClass.phpt5 $closure = function($param) { return "this is a closure"; };
6 $rf = new ReflectionFunction($closure);
11 return function($param) { return "this is a closure"; };
15 $closure = A::getClosure();
16 $rf = new ReflectionFunction($closure);
H A Dclosures_003_v1.phpt6 $closure = function($a, $b = 0) { };
8 $method = new ReflectionFunction ($closure);
15 $parameter = new ReflectionParameter ($closure, 'b');
22 {closure:%s:%d}
23 {closure:%s:%d}
H A Dbug52057.phpt6 $closure = function($a) { echo $a; };
8 $reflection = new ReflectionClass('closure');
11 $reflection = new ReflectionClass($closure);
14 $reflection = new ReflectionObject($closure);
17 $reflection = new ReflectionClass('closure');
21 $reflection = new ReflectionClass($closure);
25 $reflection = new ReflectionObject($closure);
H A DReflectionGenerator_in_Generator.phpt40 string(%d) "{closure:%s:%d}"
50 string(%d) "{closure:%s:%d}"
54 string(%d) "{closure:%s:%d}"
65 string(%d) "{closure:%s:%d}"
73 string(%d) "{closure:%s:%d}"
83 string(%d) "{closure:%s:%d}"
87 string(%d) "{closure:%s:%d}"
/php-src/Zend/tests/type_declarations/union_types/
H A Dtype_checking_strict.phpt36 $msg = str_replace('{closure}(): Argument #1 ($arg)', 'Argument ...', $msg);
69 "42" => {closure:%s:%d}(): Argument #1 ($arg) must be of type int|float, string given
70 "42.0" => {closure:%s:%d}(): Argument #1 ($arg) must be of type int|float, string given
71 "42x" => {closure:%s:%d}(): Argument #1 ($arg) must be of type int|float, string given
72 "x" => {closure:%s:%d}(): Argument #1 ($arg) must be of type int|float, string given
73 "" => {closure:%s:%d}(): Argument #1 ($arg) must be of type int|float, string given
74 true => {closure:%s:%d}(): Argument #1 ($arg) must be of type int|float, true given
75 false => {closure:%s:%d}(): Argument #1 ($arg) must be of type int|float, false given
76 null => {closure:%s:%d}(): Argument #1 ($arg) must be of type int|float, null given
77 [] => {closure:%s:%d}(): Argument #1 ($arg) must be of type int|float, array given
[all …]
H A Dtype_checking_weak.phpt34 $msg = str_replace('{closure}(): Argument #1 ($arg)', 'Argument ...', $msg);
69 "42x" => {closure:%s:%d}(): Argument #1 ($arg) must be of type int|float, string given
70 "x" => {closure:%s:%d}(): Argument #1 ($arg) must be of type int|float, string given
71 "" => {closure:%s:%d}(): Argument #1 ($arg) must be of type int|float, string given
74 null => {closure:%s:%d}(): Argument #1 ($arg) must be of type int|float, null given
75 [] => {closure:%s:%d}(): Argument #1 ($arg) must be of type int|float, array given
76 new stdClass => {closure:%s:%d}(): Argument #1 ($arg) must be of type int|float, stdClass given
122 null => {closure:%s:%d}(): Argument #1 ($arg) must be of type int|bool, null given
123 [] => {closure:%s:%d}(): Argument #1 ($arg) must be of type int|bool, array given
154 null => {closure:%s:%d}(): Argument #1 ($arg) must be of type string|bool, null given
[all …]
/php-src/Zend/tests/closures/
H A Dclosure_065.phpt2 The closure name includes the source location (2)
82 string(49) "{closure:NameSpaceName\ClassName::methodName():6}"
83 string(79) "{closure:{closure:{closure:NameSpaceName\ClassName::nestedClosure():12}:13}:14}"
84 string(42) "{closure:NameSpaceName\function_name():27}"
85 string(36) "{closure:ClassName::methodName():36}"
86 string(65) "{closure:{closure:{closure:ClassName::nestedClosure():42}:43}:44}"
87 string(28) "{closure:function_name():57}"
88 string(%d) "{closure:%sclosure_%d.php:72}"
H A Dclosure_032.phpt6 function test(closure $a) {
23 [function] => {closure:%s:%d}
32 #0 %s(%d): {closure:%s:%d}(23)
39 [function] => {closure:%s:%d}
56 [name] => {closure:%s:%d}
71 #0 %s(%d): {closure:%s:%d}(23)
H A Dclosure_064.phpt2 The closure name includes the source location
26 #1 %s(12): {closure:%s:11}()
27 #2 %s(4): {closure:%s:12}()
28 #3 %s(15): {closure:%s:3}()
29 #4 [internal function]: {closure:%s:15}(1)
H A Dclosure_060.phpt16 $closure = A::get();
17 $closure(); // init rt_cache
18 $closure->call(new class(){}, null);
19 $closure();
/php-src/Zend/tests/type_declarations/
H A Dscalar_strict_64bit.phpt63 *** Caught {closure:%s:%d}(): Argument #1 ($i) must be of type int, string given, called in %s on l…
66 *** Caught {closure:%s:%d}(): Argument #1 ($i) must be of type int, float given, called in %s on li…
69 *** Caught {closure:%s:%d}(): Argument #1 ($i) must be of type int, float given, called in %s on li…
72 *** Caught {closure:%s:%d}(): Argument #1 ($i) must be of type int, string given, called in %s on l…
75 *** Caught {closure:%s:%d}(): Argument #1 ($i) must be of type int, string given, called in %s on l…
78 *** Caught {closure:%s:%d}(): Argument #1 ($i) must be of type int, string given, called in %s on l…
84 *** Caught {closure:%s:%d}(): Argument #1 ($i) must be of type int, float given, called in %s on li…
87 *** Caught {closure:%s:%d}(): Argument #1 ($i) must be of type int, true given, called in %s on lin…
90 *** Caught {closure:%s:%d}(): Argument #1 ($i) must be of type int, false given, called in %s on li…
93 *** Caught {closure:%s:%d}(): Argument #1 ($i) must be of type int, null given, called in %s on lin…
[all …]
H A Dscalar_strict.phpt63 *** Caught {closure:%s:%d}(): Argument #1 ($i) must be of type int, string given, called in %s on l…
66 *** Caught {closure:%s:%d}(): Argument #1 ($i) must be of type int, float given, called in %s on li…
69 *** Caught {closure:%s:%d}(): Argument #1 ($i) must be of type int, float given, called in %s on li…
72 *** Caught {closure:%s:%d}(): Argument #1 ($i) must be of type int, string given, called in %s on l…
75 *** Caught {closure:%s:%d}(): Argument #1 ($i) must be of type int, string given, called in %s on l…
78 *** Caught {closure:%s:%d}(): Argument #1 ($i) must be of type int, string given, called in %s on l…
84 *** Caught {closure:%s:%d}(): Argument #1 ($i) must be of type int, float given, called in %s on li…
87 *** Caught {closure:%s:%d}(): Argument #1 ($i) must be of type int, true given, called in %s on lin…
90 *** Caught {closure:%s:%d}(): Argument #1 ($i) must be of type int, false given, called in %s on li…
93 *** Caught {closure:%s:%d}(): Argument #1 ($i) must be of type int, null given, called in %s on lin…
[all …]
H A Dscalar_strict_basic.phpt60 *** Caught {closure:%s:%d}(): Argument #1 ($i) must be of type int, float given, called in %s on li…
63 *** Caught {closure:%s:%d}(): Argument #1 ($i) must be of type int, string given, called in %s on l…
66 *** Caught {closure:%s:%d}(): Argument #1 ($i) must be of type int, true given, called in %s on lin…
69 *** Caught {closure:%s:%d}(): Argument #1 ($i) must be of type int, false given, called in %s on li…
72 *** Caught {closure:%s:%d}(): Argument #1 ($i) must be of type int, null given, called in %s on lin…
75 *** Caught {closure:%s:%d}(): Argument #1 ($i) must be of type int, array given, called in %s on li…
95 *** Caught {closure:%s:%d}(): Argument #1 ($f) must be of type float, true given, called in %s on l…
101 *** Caught {closure:%s:%d}(): Argument #1 ($f) must be of type float, null given, called in %s on l…
115 *** Caught {closure:%s:%d}(): Argument #1 ($s) must be of type string, int given, called in %s on l…
144 *** Caught {closure:%s:%d}(): Argument #1 ($b) must be of type bool, int given, called in %s on lin…
[all …]
/php-src/Zend/tests/
H A Dbug54358.phpt12 $closure = function() use ($asserter, &$function) {
16 $closure();
20 $closure = function() use ($asserter, $function) {
24 $closure();
28 $closure = function() use ($asserter, $function) {
32 $closure();
H A Dbug62991.phpt2 Bug #62991 (Segfault with generator and closure)
8 $closure = function() use ( $array ) {
12 return $closure();
17 $closure = function() use ( $array ) {
21 return $closure; // if you return the $closure and call it outside this function it works.
H A Dbug79778.phpt2 Bug #79778: Assertion failure if dumping closure with unresolved static variable
30 string(%d) "{closure:%s:%d}"
43 [name] => {closure:%s:%d}
55 string(%d) "{closure:%s:%d}"
68 [name] => {closure:%s:%d}
79 string(%d) "{closure:%s:%d}"
92 [name] => {closure:%s:%d}
H A Dbug52193.phpt2 Bug #52193 (converting closure to array yields empty array)
40 string(%d) "{closure:%s:%d}"
52 string(%d) "{closure:%s:%d}"
64 string(%d) "{closure:%s:%d}"
76 string(%d) "{closure:%s:%d}"
88 string(%d) "{closure:%s:%d}"
101 string(%d) "{closure:%s:%d}"
112 string(%d) "{closure:%s:%d}"
/php-src/ext/opcache/tests/opt/
H A Dinference_012.phpt10 $closure = function() {return "string";};
11 unset($x['b'][$closure()]['d']);
13 $arr = ['a' => $closure(), 'b' => [$closure() => []]];
15 unset($x['b'][$closure()]['d']);
/php-src/ext/opcache/tests/jit/
H A Dassign_035.phpt17 $closure = function() { return "string"; };
20 'a' => $closure(),
21 'b' => [$closure() => [],],
25 unset($x['b'][$closure()]['d']);
28 $x['a'] = $closure();

Completed in 60 milliseconds

1234567891011