Home
last modified time | relevance | path

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

12345678910

/PHP-8.2/ext/zend_test/tests/
H A Dobserver_closure_01.phpt30 <{closure}>
33 <{closure}>
41 </{closure}>
42 </{closure}>
43 <{closure}>
45 <{closure}>
51 </{closure}>
52 </{closure}>
53 <{closure}>
55 <{closure}>
[all …]
/PHP-8.2/Zend/
H A Dzend_closures.c121 zend_closure *closure; in ZEND_METHOD() local
161 GC_DELREF(&closure->std); in ZEND_METHOD()
476 return &closure->func; in zend_get_closure_method_def()
483 return &closure->this_ptr; in zend_get_closure_this_ptr()
522 zend_closure *closure; in zend_closure_new() local
540 closure->func.common.scope, closure->called_scope, &closure->this_ptr); in zend_closure_clone()
549 *fptr_ptr = &closure->func; in zend_closure_get_closure()
665 *table = Z_TYPE(closure->this_ptr) != IS_NULL ? &closure->this_ptr : NULL; in zend_closure_get_gc()
710 zend_closure *closure; in zend_create_closure_ex() local
787 closure->orig_internal_handler = closure->func.internal_function.handler; in zend_create_closure_ex()
[all …]
/PHP-8.2/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}
23 {closure}
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 DReflectionMethod_getClosure_basic.phpt32 $closure = $method->getClosure();
33 $closure();
37 $closure = $method->getClosure( $object );
38 $closure();
40 $closure();
H A DReflectionFunction_getClosure_basic.phpt18 $closure = $func->getClosure();
19 $closure();
22 $closure = $func->getClosure();
23 $closure( 'succeeded' );
/PHP-8.2/Zend/tests/type_declarations/
H A Dscalar_strict.phpt63 *** Caught {closure}(): Argument #1 ($i) must be of type int, string given, called in %s on line %d
66 *** Caught {closure}(): Argument #1 ($i) must be of type int, float given, called in %s on line %d
69 *** Caught {closure}(): Argument #1 ($i) must be of type int, float given, called in %s on line %d
72 *** Caught {closure}(): Argument #1 ($i) must be of type int, string given, called in %s on line %d
75 *** Caught {closure}(): Argument #1 ($i) must be of type int, string given, called in %s on line %d
78 *** Caught {closure}(): Argument #1 ($i) must be of type int, string given, called in %s on line %d
84 *** Caught {closure}(): Argument #1 ($i) must be of type int, float given, called in %s on line %d
87 *** Caught {closure}(): Argument #1 ($i) must be of type int, bool given, called in %s on line %d
90 *** Caught {closure}(): Argument #1 ($i) must be of type int, bool given, called in %s on line %d
93 *** Caught {closure}(): Argument #1 ($i) must be of type int, null given, called in %s on line %d
[all …]
H A Dscalar_strict_64bit.phpt63 *** Caught {closure}(): Argument #1 ($i) must be of type int, string given, called in %s on line %d
66 *** Caught {closure}(): Argument #1 ($i) must be of type int, float given, called in %s on line %d
69 *** Caught {closure}(): Argument #1 ($i) must be of type int, float given, called in %s on line %d
72 *** Caught {closure}(): Argument #1 ($i) must be of type int, string given, called in %s on line %d
75 *** Caught {closure}(): Argument #1 ($i) must be of type int, string given, called in %s on line %d
78 *** Caught {closure}(): Argument #1 ($i) must be of type int, string given, called in %s on line %d
84 *** Caught {closure}(): Argument #1 ($i) must be of type int, float given, called in %s on line %d
87 *** Caught {closure}(): Argument #1 ($i) must be of type int, bool given, called in %s on line %d
90 *** Caught {closure}(): Argument #1 ($i) must be of type int, bool given, called in %s on line %d
93 *** Caught {closure}(): Argument #1 ($i) must be of type int, null given, called in %s on line %d
[all …]
H A Dscalar_strict_basic.phpt60 *** Caught {closure}(): Argument #1 ($i) must be of type int, float given, called in %s on line %d
63 *** Caught {closure}(): Argument #1 ($i) must be of type int, string given, called in %s on line %d
66 *** Caught {closure}(): Argument #1 ($i) must be of type int, bool given, called in %s on line %d
69 *** Caught {closure}(): Argument #1 ($i) must be of type int, bool given, called in %s on line %d
72 *** Caught {closure}(): Argument #1 ($i) must be of type int, null given, called in %s on line %d
75 *** Caught {closure}(): Argument #1 ($i) must be of type int, array given, called in %s on line %d
95 *** Caught {closure}(): Argument #1 ($f) must be of type float, bool given, called in %s on line %d
98 *** Caught {closure}(): Argument #1 ($f) must be of type float, bool given, called in %s on line %d
101 *** Caught {closure}(): Argument #1 ($f) must be of type float, null given, called in %s on line %d
115 *** Caught {closure}(): Argument #1 ($s) must be of type string, int given, called in %s on line %d
[all …]
H A Dscalar_basic.phpt79 *** Caught {closure}(): Argument #1 ($i) must be of type int, string given, called in %s on line %d
82 *** Caught {closure}(): Argument #1 ($i) must be of type int, string given, called in %s on line %d
85 *** Caught {closure}(): Argument #1 ($i) must be of type int, string given, called in %s on line %d
91 *** Caught {closure}(): Argument #1 ($i) must be of type int, float given, called in %s on line %d
100 *** Caught {closure}(): Argument #1 ($i) must be of type int, null given, called in %s on line %d
104 *** Caught {closure}(): Argument #1 ($i) must be of type int, array given, called in %s on line %d
108 *** Caught {closure}(): Argument #1 ($i) must be of type int, stdClass given, called in %s on line …
115 *** Caught {closure}(): Argument #1 ($i) must be of type int, resource given, called in %s on line …
153 *** Caught {closure}(): Argument #1 ($f) must be of type float, null given, called in %s on line %d
157 *** Caught {closure}(): Argument #1 ($f) must be of type float, array given, called in %s on line %d
[all …]
H A Dscalar_return_basic.phpt77 *** Caught {closure}(): Return value must be of type int, string returned in %s on line %d
79 *** Caught {closure}(): Return value must be of type int, string returned in %s on line %d
81 *** Caught {closure}(): Return value must be of type int, string returned in %s on line %d
85 *** Caught {closure}(): Return value must be of type int, float returned in %s on line %d
91 *** Caught {closure}(): Return value must be of type int, null returned in %s on line %d
94 *** Caught {closure}(): Return value must be of type int, array returned in %s on line %d
97 *** Caught {closure}(): Return value must be of type int, stdClass returned in %s on line %d
102 *** Caught {closure}(): Return value must be of type int, resource returned in %s on line %d
128 *** Caught {closure}(): Return value must be of type float, null returned in %s on line %d
131 *** Caught {closure}(): Return value must be of type float, array returned in %s on line %d
[all …]
H A Dscalar_return_basic_64bit.phpt77 *** Caught {closure}(): Return value must be of type int, string returned in %s on line %d
79 *** Caught {closure}(): Return value must be of type int, string returned in %s on line %d
81 *** Caught {closure}(): Return value must be of type int, string returned in %s on line %d
85 *** Caught {closure}(): Return value must be of type int, float returned in %s on line %d
91 *** Caught {closure}(): Return value must be of type int, null returned in %s on line %d
94 *** Caught {closure}(): Return value must be of type int, array returned in %s on line %d
97 *** Caught {closure}(): Return value must be of type int, stdClass returned in %s on line %d
102 *** Caught {closure}(): Return value must be of type int, resource returned in %s on line %d
128 *** Caught {closure}(): Return value must be of type float, null returned in %s on line %d
131 *** Caught {closure}(): Return value must be of type float, array returned in %s on line %d
[all …]
/PHP-8.2/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 Dclosure_032.phpt6 function test(closure $a) {
23 [function] => {closure}
32 #0 %s(%d): {closure}(23)
39 [function] => {closure}
68 #0 %s(%d): {closure}(23)
H A Dclosure_060.phpt16 $closure = A::get();
17 $closure(); // init rt_cache
18 $closure->call(new class(){}, null);
19 $closure();
H A Dbug67856.phpt11 Warning: {closure}(): Argument #1 ($a) must be passed by reference, value given in %s on line %d
13 Warning: {closure}(): Argument #2 ($b) must be passed by reference, value given in %s on line %d
15 Warning: {closure}(): Argument #1 ($a) must be passed by reference, value given in %s on line %d
17 Warning: {closure}(): Argument #2 ($b) must be passed by reference, value given in %s on line %d
19 Warning: {closure}(): Argument #1 ($a) must be passed by reference, value given in %s on line %d
21 Warning: {closure}(): Argument #2 ($b) must be passed by reference, value given in %s on line %d
/PHP-8.2/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-8.2/ext/opcache/tests/jit/
H A Dassign_035.phpt18 $closure = function() { return "string"; };
21 'a' => $closure(),
22 'b' => [$closure() => [],],
26 unset($x['b'][$closure()]['d']);
29 $x['a'] = $closure();
/PHP-8.2/ext/spl/tests/
H A Dspl_autoload_014.phpt5 $closure = function($class) {
6 echo "closure called with class $class\n";
29 spl_autoload_register($closure);
35 spl_autoload_unregister($closure);
42 closure called with class TestX

Completed in 28 milliseconds

12345678910