File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -8,19 +8,25 @@ class Foo {
8
8
}
9
9
10
10
public static function __callStatic ($ method , $ args ) {
11
- return $ method ;
11
+ return static ::class . " :: " . $ method ;
12
12
}
13
13
}
14
14
15
+ class Bar extends Foo {}
16
+
15
17
$ foo = new Foo ;
16
18
$ bar = $ foo ->anythingInstance (...);
17
19
18
- echo $ bar () . PHP_EOL ;
20
+ echo $ bar (), "\n" ;
19
21
20
22
$ qux = Foo::anythingStatic (...);
23
+ echo $ qux (), "\n" ;
24
+
25
+ $ qux2 = Bar::anythingStatic (...);
26
+ echo $ qux2 (), "\n" ;
21
27
22
- echo $ qux ();
23
28
?>
24
29
--EXPECT--
25
30
anythingInstance
26
- anythingStatic
31
+ Foo::anythingStatic
32
+ Bar::anythingStatic
Original file line number Diff line number Diff line change @@ -282,6 +282,7 @@ static ZEND_NAMED_FUNCTION(zend_closure_call_magic) /* {{{ */ {
282
282
}
283
283
284
284
fcc .object = fci .object = Z_OBJ_P (ZEND_THIS );
285
+ fcc .called_scope = zend_get_called_scope (EG (current_execute_data ));
285
286
286
287
zend_call_function (& fci , & fcc );
287
288
You can’t perform that action at this time.
0 commit comments