/PHP-8.0/ext/zend_test/tests/ |
H A D | observer_closure_01.phpt | 29 <{closure}> 32 <{closure}> 34 </{closure}> 35 </{closure}> 36 <{closure}> 38 <{closure}> 40 </{closure}> 41 </{closure}> 42 <{closure}> 44 <{closure}> [all …]
|
/PHP-8.0/Zend/ |
H A D | zend_closures.c | 126 zend_closure *closure; in ZEND_METHOD() local 194 GC_DELREF(&closure->std); in ZEND_METHOD() 426 return &closure->func; in zend_get_closure_method_def() 433 return &closure->this_ptr; in zend_get_closure_this_ptr() 503 zend_closure *closure; in zend_closure_new() local 521 closure->func.common.scope, closure->called_scope, &closure->this_ptr); in zend_closure_clone() 529 *fptr_ptr = &closure->func; in zend_closure_get_closure() 634 *table = Z_TYPE(closure->this_ptr) != IS_NULL ? &closure->this_ptr : NULL; in zend_closure_get_gc() 687 zend_closure *closure; in zend_create_closure() local 755 closure->orig_internal_handler = closure->func.internal_function.handler; in zend_create_closure() [all …]
|
/PHP-8.0/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 | 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 | ReflectionFunction_getClosure_basic.phpt | 18 $closure = $func->getClosure(); 19 $closure(); 22 $closure = $func->getClosure(); 23 $closure( 'succeeded' );
|
H A D | ReflectionMethod_getClosure_basic.phpt | 32 $closure = $method->getClosure(); 33 $closure(); 37 $closure = $method->getClosure( $object ); 38 $closure(); 40 $closure();
|
/PHP-8.0/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, 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 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, 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 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, 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 D | scalar_return_basic.phpt | 75 *** Caught {closure}(): Return value must be of type int, string returned in %s on line %d 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 83 *** Caught {closure}(): Return value must be of type int, float returned in %s on line %d 89 *** Caught {closure}(): Return value must be of type int, null returned in %s on line %d 92 *** Caught {closure}(): Return value must be of type int, array returned in %s on line %d 95 *** Caught {closure}(): Return value must be of type int, stdClass returned in %s on line %d 100 *** Caught {closure}(): Return value must be of type int, resource returned in %s on line %d 126 *** Caught {closure}(): Return value must be of type float, null returned in %s on line %d 129 *** 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 | 75 *** Caught {closure}(): Return value must be of type int, string returned in %s on line %d 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 83 *** Caught {closure}(): Return value must be of type int, float returned in %s on line %d 89 *** Caught {closure}(): Return value must be of type int, null returned in %s on line %d 92 *** Caught {closure}(): Return value must be of type int, array returned in %s on line %d 95 *** Caught {closure}(): Return value must be of type int, stdClass returned in %s on line %d 100 *** Caught {closure}(): Return value must be of type int, resource returned in %s on line %d 126 *** Caught {closure}(): Return value must be of type float, null returned in %s on line %d 129 *** Caught {closure}(): Return value must be of type float, array returned in %s on line %d [all …]
|
H A D | scalar_basic.phpt | 77 *** Caught {closure}(): Argument #1 ($i) must be of type int, string given, called in %s on line %d 80 *** Caught {closure}(): Argument #1 ($i) must be of type int, string given, called in %s on line %d 83 *** Caught {closure}(): Argument #1 ($i) must be of type int, string given, called in %s on line %d 89 *** Caught {closure}(): Argument #1 ($i) must be of type int, float given, called in %s on line %d 98 *** Caught {closure}(): Argument #1 ($i) must be of type int, null given, called in %s on line %d 102 *** Caught {closure}(): Argument #1 ($i) must be of type int, array given, called in %s on line %d 106 *** Caught {closure}(): Argument #1 ($i) must be of type int, stdClass given, called in %s on line … 113 *** Caught {closure}(): Argument #1 ($i) must be of type int, resource given, called in %s on line … 151 *** Caught {closure}(): Argument #1 ($f) must be of type float, null given, called in %s on line %d 155 *** Caught {closure}(): Argument #1 ($f) must be of type float, array given, called in %s on line %d [all …]
|
/PHP-8.0/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 | 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
|
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-8.0/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.0/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.0/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
|