/PHP-8.3/ext/zend_test/tests/ |
H A D | observer_closure_01.phpt | 31 <{closure}> 34 <{closure}> 42 </{closure}> 43 </{closure}> 44 <{closure}> 46 <{closure}> 52 </{closure}> 53 </{closure}> 54 <{closure}> 56 <{closure}> [all …]
|
/PHP-8.3/Zend/ |
H A D | zend_closures.c | 126 zend_closure *closure; in ZEND_METHOD() local 166 GC_DELREF(&closure->std); in ZEND_METHOD() 492 return &closure->func; in zend_get_closure_method_def() 499 return &closure->this_ptr; in zend_get_closure_this_ptr() 538 zend_closure *closure; in zend_closure_new() local 555 closure->func.common.scope, closure->called_scope, &closure->this_ptr); in zend_closure_clone() 564 *fptr_ptr = &closure->func; in zend_closure_get_closure() 676 *table = Z_TYPE(closure->this_ptr) != IS_NULL ? &closure->this_ptr : NULL; in zend_closure_get_gc() 722 zend_closure *closure; in zend_create_closure_ex() local 799 closure->orig_internal_handler = closure->func.internal_function.handler; in zend_create_closure_ex() [all …]
|
/PHP-8.3/ext/reflection/tests/ |
H A D | gh10623.phpt | 10 $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 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 | 5 $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 D | closures_003_v1.phpt | 6 $closure = function($a, $b = 0) { }; 8 $method = new ReflectionFunction ($closure); 15 $parameter = new ReflectionParameter ($closure, 'b'); 22 {closure} 23 {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 | 32 $closure = $method->getClosure(); 33 $closure(); 37 $closure = $method->getClosure( $object ); 38 $closure(); 40 $closure();
|
H A D | ReflectionFunction_getClosure_basic.phpt | 18 $closure = $func->getClosure(); 19 $closure(); 22 $closure = $func->getClosure(); 23 $closure( 'succeeded' );
|
/PHP-8.3/Zend/tests/type_declarations/ |
H A D | scalar_strict.phpt | 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, 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, true given, called in %s on line %d 90 *** Caught {closure}(): Argument #1 ($i) must be of type int, false 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 D | scalar_strict_64bit.phpt | 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, 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, true given, called in %s on line %d 90 *** Caught {closure}(): Argument #1 ($i) must be of type int, false 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 D | scalar_strict_basic.phpt | 60 *** 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, true given, called in %s on line %d 69 *** Caught {closure}(): Argument #1 ($i) must be of type int, false 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, true 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 144 *** Caught {closure}(): Argument #1 ($b) must be of type bool, int given, called in %s on line %d [all …]
|
H A D | scalar_basic.phpt | 79 *** 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 D | scalar_return_basic.phpt | 77 *** 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 D | scalar_return_basic_64bit.phpt | 77 *** 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.3/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 %s(%d): {closure}(23) 39 [function] => {closure} 68 #0 %s(%d): {closure}(23)
|
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 | bug67856.phpt | 11 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.3/ext/opcache/tests/opt/ |
H A D | inference_012.phpt | 10 $closure = function() {return "string";}; 11 unset($x['b'][$closure()]['d']); 13 $arr = ['a' => $closure(), 'b' => [$closure() => []]]; 15 unset($x['b'][$closure()]['d']);
|
/PHP-8.3/ext/opcache/tests/jit/ |
H A D | assign_035.phpt | 18 $closure = function() { return "string"; }; 21 'a' => $closure(), 22 'b' => [$closure() => [],], 26 unset($x['b'][$closure()]['d']); 29 $x['a'] = $closure();
|
/PHP-8.3/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); 42 closure called with class TestX
|