/PHP-7.2/Zend/ |
H A D | zend_closures.c | 114 zend_closure *closure; in ZEND_METHOD() local 186 zend_closure *closure; in ZEND_METHOD() local 379 return &closure->func; in zend_get_closure_method_def() 457 zend_closure *closure; in zend_closure_new() local 475 closure->func.common.scope, closure->called_scope, &closure->this_ptr); in zend_closure_clone() 565 *table = Z_TYPE(closure->this_ptr) != IS_NULL ? &closure->this_ptr : NULL; in zend_closure_get_gc() 648 zend_closure *closure; in zend_create_closure() local 662 closure->func.common.prototype = (zend_function*)closure; in zend_create_closure() 692 closure->func.common.prototype = (zend_function*)closure; in zend_create_closure() 701 closure->orig_internal_handler = closure->func.internal_function.handler; in zend_create_closure() [all …]
|
/PHP-7.2/ext/reflection/tests/ |
H A D | closures_004.phpt | 2 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 D | bug66430.phpt | 2 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 D | closures_001.phpt | 6 $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 D | ReflectionFunction_getClosureScopeClass.phpt | 9 $closure = function($param) { return "this is a closure"; }; 10 $rf = new ReflectionFunction($closure); 15 return function($param) { return "this is a closure"; }; 19 $closure = A::getClosure(); 20 $rf = new ReflectionFunction($closure);
|
H A D | closures_003_v1.phpt | 6 $closure = function($a, $b = 0) { }; 8 $method = new ReflectionFunction ($closure); 15 $parameter = new ReflectionParameter ($closure, 'b'); 23 {closure} 24 {closure}
|
H A D | bug52057.phpt | 6 $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 D | ReflectionMethod_getClosure_basic.phpt | 6 * 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 D | ReflectionFunction_getClosure_basic.phpt | 6 * Description: Returns a dynamically created closure for the function 24 $closure = $func->getClosure(); 25 $closure(); 28 $closure = $func->getClosure(); 29 $closure( 'succeeded' );
|
H A D | ReflectionFunction_getClosureThis.phpt | 9 $closure = function($param) { return "this is a closure"; }; 10 $rf = new ReflectionFunction($closure);
|
/PHP-7.2/Zend/tests/ |
H A D | bug54358.phpt | 12 $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 D | bug62991.phpt | 2 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 D | closure_032.phpt | 6 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 D | closure_060.phpt | 16 $closure = A::get(); 17 $closure(); // init rt_cache 18 $closure->call(new class(){}, null); 19 $closure();
|
H A D | closure_037.phpt | 33 $closure = $a->getClosure(); 34 $closure(); 36 $closure = $b->getClosure(); 37 $closure();
|
H A D | closure_061.phpt | 121 Cannot rebind scope of closure created by ReflectionFunctionAbstract::getClosure() 124 Cannot rebind scope of closure created by ReflectionFunctionAbstract::getClosure() 127 Cannot bind closure to scope of internal class stdClass 142 Cannot rebind scope of closure created by ReflectionFunctionAbstract::getClosure() 145 Cannot rebind scope of closure created by ReflectionFunctionAbstract::getClosure() 148 Cannot bind closure to scope of internal class stdClass 160 Cannot bind an instance to a static closure 163 Cannot bind an instance to a static closure 166 Cannot rebind scope of closure created by ReflectionFunctionAbstract::getClosure() 169 Cannot rebind scope of closure created by ReflectionFunctionAbstract::getClosure() [all …]
|
H A D | bug52060.phpt | 2 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
|
/PHP-7.2/Zend/tests/type_declarations/ |
H A D | scalar_strict.phpt | 73 *** Caught Argument 1 passed to {closure}() must be of the type integer, string given, called in %s… 76 *** Caught Argument 1 passed to {closure}() must be of the type integer, float given, called in %s … 79 *** Caught Argument 1 passed to {closure}() must be of the type integer, float given, called in %s … 82 *** Caught Argument 1 passed to {closure}() must be of the type integer, string given, called in %s… 85 *** Caught Argument 1 passed to {closure}() must be of the type integer, string given, called in %s… 94 *** Caught Argument 1 passed to {closure}() must be of the type integer, float given, called in %s … 103 *** Caught Argument 1 passed to {closure}() must be of the type integer, null given, called in %s o… 126 *** Caught Argument 1 passed to {closure}() must be of the type float, string given, called in %s o… 135 *** Caught Argument 1 passed to {closure}() must be of the type float, string given, called in %s o… 156 *** Caught Argument 1 passed to {closure}() must be of the type float, null given, called in %s on … [all …]
|
H A D | scalar_strict_64bit.phpt | 73 *** Caught Argument 1 passed to {closure}() must be of the type integer, string given, called in %s… 76 *** Caught Argument 1 passed to {closure}() must be of the type integer, float given, called in %s … 79 *** Caught Argument 1 passed to {closure}() must be of the type integer, float given, called in %s … 82 *** Caught Argument 1 passed to {closure}() must be of the type integer, string given, called in %s… 85 *** Caught Argument 1 passed to {closure}() must be of the type integer, string given, called in %s… 94 *** Caught Argument 1 passed to {closure}() must be of the type integer, float given, called in %s … 103 *** Caught Argument 1 passed to {closure}() must be of the type integer, null given, called in %s o… 126 *** Caught Argument 1 passed to {closure}() must be of the type float, string given, called in %s o… 135 *** Caught Argument 1 passed to {closure}() must be of the type float, string given, called in %s o… 156 *** Caught Argument 1 passed to {closure}() must be of the type float, null given, called in %s on … [all …]
|
H A D | scalar_strict_basic.phpt | 71 *** Caught Argument 1 passed to {closure}() must be of the type integer, float given, called in %s … 74 *** Caught Argument 1 passed to {closure}() must be of the type integer, string given, called in %s… 83 *** Caught Argument 1 passed to {closure}() must be of the type integer, null given, called in %s o… 86 *** Caught Argument 1 passed to {closure}() must be of the type integer, array given, called in %s … 103 *** Caught Argument 1 passed to {closure}() must be of the type float, string given, called in %s o… 106 *** Caught Argument 1 passed to {closure}() must be of the type float, boolean given, called in %s … 112 *** Caught Argument 1 passed to {closure}() must be of the type float, null given, called in %s on … 115 *** Caught Argument 1 passed to {closure}() must be of the type float, array given, called in %s on… 118 *** Caught Argument 1 passed to {closure}() must be of the type float, object given, called in %s o… 129 *** Caught Argument 1 passed to {closure}() must be of the type string, float given, called in %s o… [all …]
|
H A D | scalar_basic.phpt | 81 *** Caught Argument 1 passed to {closure}() must be of the type integer, string given, called in %s… 84 *** Caught Argument 1 passed to {closure}() must be of the type integer, string given, called in %s… 90 *** Caught Argument 1 passed to {closure}() must be of the type integer, float given, called in %s … 99 *** Caught Argument 1 passed to {closure}() must be of the type integer, null given, called in %s o… 103 *** Caught Argument 1 passed to {closure}() must be of the type integer, array given, called in %s … 135 *** Caught Argument 1 passed to {closure}() must be of the type float, string given, called in %s o… 138 *** Caught Argument 1 passed to {closure}() must be of the type float, string 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… 161 *** Caught Argument 1 passed to {closure}() must be of the type float, object given, called in %s o… [all …]
|
H A D | scalar_return_basic.phpt | 79 *** Caught Return value of {closure}() must be of the type integer, string returned in %s on line %d 81 *** Caught Return value of {closure}() must be of the type integer, string returned in %s on line %d 85 *** Caught Return value of {closure}() must be of the type integer, float returned in %s on line %d 91 *** Caught Return value of {closure}() must be of the type integer, null returned in %s on line %d 94 *** Caught Return value of {closure}() must be of the type integer, array returned in %s on line %d 117 *** Caught Return value of {closure}() must be of the type float, string returned in %s on line %d 119 *** Caught Return value of {closure}() must be of the type float, string returned in %s on line %d 129 *** Caught Return value of {closure}() must be of the type float, null returned in %s on line %d 132 *** Caught Return value of {closure}() must be of the type float, array returned in %s on line %d 135 *** Caught Return value of {closure}() must be of the type float, object returned in %s on line %d [all …]
|
H A D | scalar_return_basic_64bit.phpt | 79 *** Caught Return value of {closure}() must be of the type integer, string returned in %s on line %d 81 *** Caught Return value of {closure}() must be of the type integer, string returned in %s on line %d 85 *** Caught Return value of {closure}() must be of the type integer, float returned in %s on line %d 91 *** Caught Return value of {closure}() must be of the type integer, null returned in %s on line %d 94 *** Caught Return value of {closure}() must be of the type integer, array returned in %s on line %d 117 *** Caught Return value of {closure}() must be of the type float, string returned in %s on line %d 119 *** Caught Return value of {closure}() must be of the type float, string returned in %s on line %d 129 *** Caught Return value of {closure}() must be of the type float, null returned in %s on line %d 132 *** Caught Return value of {closure}() must be of the type float, array returned in %s on line %d 135 *** Caught Return value of {closure}() must be of the type float, object returned in %s on line %d [all …]
|
/PHP-7.2/ext/spl/tests/ |
H A D | spl_autoload_014.phpt | 5 $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.2/Zend/tests/anon/ |
H A D | 013.phpt | 2 closure binding to anonymous class 10 $closure = Closure::bind($foo, $class, $class); 11 var_dump($closure());
|