Home
last modified time | relevance | path

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

123456

/PHP-7.4/Zend/
H A Dzend_closures.c124 zend_closure *closure; in ZEND_METHOD() local
192 GC_DELREF(&closure->std); in ZEND_METHOD()
205 zend_closure *closure; in ZEND_METHOD() local
414 return &closure->func; in zend_get_closure_method_def()
491 zend_closure *closure; in zend_closure_new() local
509 closure->func.common.scope, closure->called_scope, &closure->this_ptr); in zend_closure_clone()
606 *table = Z_TYPE(closure->this_ptr) != IS_NULL ? &closure->this_ptr : NULL; in zend_closure_get_gc()
627 ZEND_ARG_INFO(0, closure)
689 zend_closure *closure; in zend_create_closure() local
756 closure->orig_internal_handler = closure->func.internal_function.handler; in zend_create_closure()
[all …]
/PHP-7.4/ext/reflection/tests/
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');
23 {closure}
24 {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 DReflectionFunction_getClosure_basic.phpt6 * Description: Returns a dynamically created closure for the function
24 $closure = $func->getClosure();
25 $closure();
28 $closure = $func->getClosure();
29 $closure( 'succeeded' );
H A DReflectionMethod_getClosure_basic.phpt6 * Description: Returns a dynamically created closure for the method
38 $closure = $method->getClosure();
39 $closure();
43 $closure = $method->getClosure( $object );
44 $closure();
46 $closure();
H A DReflectionFunction_getClosureThis.phpt5 $closure = function($param) { return "this is a closure"; };
6 $rf = new ReflectionFunction($closure);
H A DReflectionFunction_isClosure_basic.phpt8 $closure = function($param) { return "this is a closure"; };
9 $rc = new ReflectionFunction($closure);
/PHP-7.4/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 {closure}(23) called at [%s:%d]
39 [function] => {closure}
68 #0 {closure}(23) called at [%s:%d]
H A Dclosure_060.phpt16 $closure = A::get();
17 $closure(); // init rt_cache
18 $closure->call(new class(){}, null);
19 $closure();
H A Dbug52060.phpt2 Bug #52060 (Memory leak when passing a closure to method_exists())
6 $closure = function($a) { echo $a; };
8 var_dump(method_exists($closure, '__invoke')); // true
H A Dclosure_037.phpt33 $closure = $a->getClosure();
34 $closure();
36 $closure = $b->getClosure();
37 $closure();
/PHP-7.4/Zend/tests/type_declarations/
H A Dscalar_strict_64bit.phpt63 *** Caught Argument 1 passed to {closure}() must be of the type int, string given, called in %s on …
66 *** Caught Argument 1 passed to {closure}() must be of the type int, float given, called in %s on l…
69 *** Caught Argument 1 passed to {closure}() must be of the type int, float given, called in %s on l…
72 *** Caught Argument 1 passed to {closure}() must be of the type int, string given, called in %s on …
75 *** Caught Argument 1 passed to {closure}() must be of the type int, string given, called in %s on …
78 *** Caught Argument 1 passed to {closure}() must be of the type int, string given, called in %s on …
84 *** Caught Argument 1 passed to {closure}() must be of the type int, float given, called in %s on l…
87 *** Caught Argument 1 passed to {closure}() must be of the type int, bool given, called in %s on li…
90 *** Caught Argument 1 passed to {closure}() must be of the type int, bool given, called in %s on li…
93 *** Caught Argument 1 passed to {closure}() must be of the type int, null given, called in %s on li…
[all …]
H A Dscalar_strict.phpt63 *** Caught Argument 1 passed to {closure}() must be of the type int, string given, called in %s on …
66 *** Caught Argument 1 passed to {closure}() must be of the type int, float given, called in %s on l…
69 *** Caught Argument 1 passed to {closure}() must be of the type int, float given, called in %s on l…
72 *** Caught Argument 1 passed to {closure}() must be of the type int, string given, called in %s on …
75 *** Caught Argument 1 passed to {closure}() must be of the type int, string given, called in %s on …
78 *** Caught Argument 1 passed to {closure}() must be of the type int, string given, called in %s on …
84 *** Caught Argument 1 passed to {closure}() must be of the type int, float given, called in %s on l…
87 *** Caught Argument 1 passed to {closure}() must be of the type int, bool given, called in %s on li…
90 *** Caught Argument 1 passed to {closure}() must be of the type int, bool given, called in %s on li…
93 *** Caught Argument 1 passed to {closure}() must be of the type int, null given, called in %s on li…
[all …]
H A Dscalar_strict_basic.phpt60 *** Caught Argument 1 passed to {closure}() must be of the type int, float given, called in %s on l…
63 *** Caught Argument 1 passed to {closure}() must be of the type int, string given, called in %s on …
66 *** Caught Argument 1 passed to {closure}() must be of the type int, bool given, called in %s on li…
69 *** Caught Argument 1 passed to {closure}() must be of the type int, bool given, called in %s on li…
72 *** Caught Argument 1 passed to {closure}() must be of the type int, null given, called in %s on li…
75 *** Caught Argument 1 passed to {closure}() must be of the type int, array given, called in %s on l…
78 *** Caught Argument 1 passed to {closure}() must be of the type int, object given, called in %s on …
95 *** Caught Argument 1 passed to {closure}() must be of the type float, bool given, called in %s on …
98 *** Caught Argument 1 passed to {closure}() must be of the type float, bool given, called in %s on …
101 *** Caught Argument 1 passed to {closure}() must be of the type float, null given, called in %s on …
[all …]
H A Dscalar_return_basic.phpt78 *** Caught Return value of {closure}() must be of the type int, string returned in %s on line %d
80 *** Caught Return value of {closure}() must be of the type int, string returned in %s on line %d
84 *** Caught Return value of {closure}() must be of the type int, float returned in %s on line %d
90 *** Caught Return value of {closure}() must be of the type int, null returned in %s on line %d
93 *** Caught Return value of {closure}() must be of the type int, array returned in %s on line %d
96 *** Caught Return value of {closure}() must be of the type int, object returned in %s on line %d
99 *** Caught Return value of {closure}() must be of the type int, object returned in %s on line %d
101 *** Caught Return value of {closure}() must be of the type int, resource returned in %s on line %d
128 *** Caught Return value of {closure}() must be of the type float, null returned in %s on line %d
131 *** Caught Return value of {closure}() must be of the type float, array returned in %s on line %d
[all …]
H A Dscalar_basic.phpt81 *** Caught Argument 1 passed to {closure}() must be of the type int, string given, called in %s on …
84 *** Caught Argument 1 passed to {closure}() must be of the type int, string given, called in %s on …
90 *** Caught Argument 1 passed to {closure}() must be of the type int, float given, called in %s on l…
99 *** Caught Argument 1 passed to {closure}() must be of the type int, null given, called in %s on li…
103 *** Caught Argument 1 passed to {closure}() must be of the type int, array given, called in %s on l…
107 *** Caught Argument 1 passed to {closure}() must be of the type int, object given, called in %s on …
111 *** Caught Argument 1 passed to {closure}() must be of the type int, object given, called in %s on …
114 *** Caught Argument 1 passed to {closure}() must be of the type int, resource given, called in %s o…
153 *** Caught Argument 1 passed to {closure}() must be of the type float, null given, called in %s on …
157 *** Caught Argument 1 passed to {closure}() must be of the type float, array given, called in %s on…
[all …]
H A Dscalar_return_basic_64bit.phpt78 *** Caught Return value of {closure}() must be of the type int, string returned in %s on line %d
80 *** Caught Return value of {closure}() must be of the type int, string returned in %s on line %d
84 *** Caught Return value of {closure}() must be of the type int, float returned in %s on line %d
90 *** Caught Return value of {closure}() must be of the type int, null returned in %s on line %d
93 *** Caught Return value of {closure}() must be of the type int, array returned in %s on line %d
96 *** Caught Return value of {closure}() must be of the type int, object returned in %s on line %d
99 *** Caught Return value of {closure}() must be of the type int, object returned in %s on line %d
101 *** Caught Return value of {closure}() must be of the type int, resource returned in %s on line %d
128 *** Caught Return value of {closure}() must be of the type float, null returned in %s on line %d
131 *** Caught Return value of {closure}() must be of the type float, array returned in %s on line %d
[all …]
/PHP-7.4/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);
43 closure called with class TestX
/PHP-7.4/Zend/tests/anon/
H A D013.phpt2 closure binding to anonymous class
10 $closure = Closure::bind($foo, $class, $class);
11 var_dump($closure());

Completed in 44 milliseconds

123456