Home
last modified time | relevance | path

Searched refs:Closure (Results 1 – 25 of 157) sorted by relevance

1234567

/PHP-8.2/Zend/tests/
H A Dclosure_compare.phpt2 Closure comparison
9 $closures[0] = Closure::fromCallable('foo');
10 $closures[1] = Closure::fromCallable('foo');
14 $closures[0] = Closure::fromCallable('strlen');
15 $closures[1] = Closure::fromCallable('strlen');
19 $closures[0] = Closure::fromCallable('strlen');
20 $closures[1] = Closure::fromCallable('strrev');
94 printf("Closure[0]::invoke != Closure[1]::invoke: %s\n", $closures[2] != $closures[3] ? "OK" : "FAI…
99 printf("Closure[0]::invoke == Closure[0]::invoke: %s\n", $closures[2] == $closures[3] ? "OK" : "FAI…
113 Closure[0]::invoke != Closure[1]::invoke: OK
[all …]
H A Dgh8962.phpt14 var_dump(\Closure::fromCallable([new Bar(), 'baz']));
15 var_dump(\Closure::fromCallable([Bar::class, 'qux']));
16 var_dump(\Closure::fromCallable('Foo\Bar::qux'));
22 object(Closure)#2 (2) {
29 object(Closure)#2 (1) {
33 object(Closure)#2 (1) {
37 object(Closure)#2 (1) {
H A Dbug52193.phpt38 object(Closure)#%d (0) {
44 object(Closure)#%d (1) {
50 object(Closure)#%d (0) {
56 object(Closure)#%d (1) {
62 object(Closure)#%d (0) {
69 object(Closure)#%d (0) {
74 object(Closure)#%d (0) {
H A Dclosure_042.phpt2 Closure 042: Binding an instance to a non-scoped non-static closures gives it a dummy scope
10 var_dump($rm->getClosureScopeClass()->name); //dummy sope is Closure
16 var_dump($rm->getClosureScopeClass()->name); //dummy sope is Closure
23 string(7) "Closure"
26 string(7) "Closure"
H A Dbug78689.phpt2 Bug #78689: Closure::fromCallable() doesn't handle [Closure, '__invoke']
8 $b = Closure::fromCallable($a);
H A Dclosure_032.phpt2 Closure 032: Testing Closure and debug_backtrace
54 [0] => Closure Object
69 #1 %s(%d): test(Object(Closure))
H A Dbug77627.phpt2 Fix for #77627 method_exists on Closure::__invoke without object returns false
5 var_dump(method_exists(Closure::class, "__invoke"));
6 var_dump(method_exists(Closure::class, "__INVOKE"));
H A Dclosure_022.phpt2 Closure 022: Closure properties
11 Fatal error: Uncaught Error: Cannot create dynamic property Closure::$a in %s:%d
H A Dclosure_016.phpt2 Closure 016: closures and is_callable()
45 Closure::__invoke
47 Closure::__invoke
49 Closure::__invoke
51 Closure::__invoke
H A Dclosure_031.phpt2 Closure 031: Closure properties with custom error handlers
18 Warning: Undefined property: Closure::$a
H A Dclosure_027.phpt2 Closure 027: Testing Closure type-hint
6 function test(Closure $a) {
33 Fatal error: Uncaught TypeError: test(): Argument #1 ($a) must be of type Closure, stdClass given, …
H A Dclosure_015.phpt2 Closure 015: converting to string/unicode
20 Object of class Closure could not be converted to string
21 Object of class Closure could not be converted to string
H A Dclosure_026.phpt2 Closure 026: Assigning a closure object to an array in $this
36 object(Closure)#%d (1) {
47 object(Closure)#%d (1) {
H A Dclosure_call_internal.phpt2 Closure::call() on internal method
6 var_dump(Closure::fromCallable([new DateTime(), 'getTimestamp'])->call(new DateTime('@123')));
/PHP-8.2/Zend/
H A Dzend_closures_arginfo.h7 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_Closure_bind, 0, 2, Closure, 1)
8 ZEND_ARG_OBJ_INFO(0, closure, Closure, 0)
13 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_Closure_bindTo, 0, 1, Closure, 1)
28 ZEND_METHOD(Closure, __construct);
29 ZEND_METHOD(Closure, bind);
30 ZEND_METHOD(Closure, bindTo);
31 ZEND_METHOD(Closure, call);
32 ZEND_METHOD(Closure, fromCallable);
36 ZEND_ME(Closure, __construct, arginfo_class_Closure___construct, ZEND_ACC_PRIVATE)
38 ZEND_ME(Closure, bindTo, arginfo_class_Closure_bindTo, ZEND_ACC_PUBLIC)
[all …]
H A Dzend_closures.stub.php9 final class Closure class
14 Closure $closure,
17 ): ?Closure {}
19 public function bindTo(?object $newThis, object|string|null $newScope = "static"): ?Closure {}
23 public static function fromCallable(callable $callback): Closure {}
/PHP-8.2/Zend/tests/closures/
H A Dclosure_from_callable.inc58 return Closure::fromCallable([$this, 'privateInstanceFunc']);
73 return Closure::fromCallable([$this, 'publicInstanceFunc']);
78 return Closure::fromCallable([$this, 'publicInstanceFunc']);
83 return Closure::fromCallable('self::publicInstanceFunc');
99 return Closure::fromCallable([$this, 'privateInstanceFunc']);
114 return Closure::fromCallable('parent::publicInstanceFunc');
119 return Closure::fromCallable('self::publicInstanceFunc');
125 return Closure::fromCallable('self::protectedInstanceFunc');
130 return Closure::fromCallable('self::privateInstanceFunc');
176 return Closure::fromCallable([$foo, 'privateStaticFunction']);
[all …]
H A Dclosure_from_callable_lsb.phpt2 Testing Closure::fromCallable() functionality: Late static binding
15 Closure::fromCallable(['A', 'test'])();
16 Closure::fromCallable(['B', 'test'])();
H A Dclosure_from_callable_basic.phpt2 Testing Closure::fromCallable() functionality: Basic
9 $fn = Closure::fromCallable(['Foo', 'publicStaticFunction']);
13 $fn = Closure::fromCallable(['fOo', 'publicStaticfUNCTION']);
17 $fn = Closure::fromCallable('Foo::publicStaticFunction');
21 $fn = Closure::fromCallable([new Foo, 'publicInstanceFunc']);
29 $fn = Closure::fromCallable('bar');
33 $fn = Closure::fromCallable('BAR');
36 echo 'Closure is already a closure';
37 $fn = Closure::fromCallable($closure);
41 $fn = Closure::fromCallable(new PublicInvocable);
[all …]
H A Dclosure_from_callable_gc.phpt2 Closure::fromCallable() and GC
15 $fn = Closure::fromCallable([new Test, 'method2']);
20 $fn = Closure::fromCallable([new Test, 'method']);
/PHP-8.2/ext/reflection/tests/
H A Dbug52057.phpt2 Bug #52057 (ReflectionClass fails on Closure class)
38 string(7) "Closure"
40 string(17) "Closure::__invoke"
45 string(7) "Closure"
47 string(17) "Closure::__invoke"
52 string(7) "Closure"
54 string(17) "Closure::__invoke"
H A Dbug75186.phpt2 Bug #75186: Inconsistent reflection of Closure:::__invoke()
6 $rc = new ReflectionClass(Closure::class);
23 string(7) "Closure"
/PHP-8.2/ext/zend_test/tests/
H A Dobserver_closure_02.phpt20 $closure = \Closure::fromCallable($callable);
28 <!-- init Closure::fromCallable() -->
29 <Closure::fromCallable>
30 </Closure::fromCallable>
/PHP-8.2/ext/opcache/tests/jit/
H A Dclosure_001.phpt35 object(Closure)#3 (1) {
40 object(Closure)#3 (1) {
45 object(Closure)#3 (0) {
/PHP-8.2/Zend/tests/attributes/
H A Dgh8421.phpt18 public function getClosureDefinedInScope(): Closure
24 public function getStaticClosureDefinedInScope(): Closure
30 public static function getClosureDefinedInScopeStatically(): Closure
36 public static function getStaticClosureDefinedInScopeStatically(): Closure

Completed in 25 milliseconds

1234567