1--TEST-- 2First Class Callable from Magic 3--FILE-- 4<?php 5class Foo { 6 public function __call($method, $args) { 7 return $method; 8 } 9 10 public static function __callStatic($method, $args) { 11 return static::class . "::" . $method; 12 } 13} 14 15class Bar extends Foo {} 16 17$foo = new Foo; 18$bar = $foo->anythingInstance(...); 19 20echo $bar(), "\n"; 21 22$qux = Foo::anythingStatic(...); 23echo $qux(), "\n"; 24 25$qux2 = Bar::anythingStatic(...); 26echo $qux2(), "\n"; 27 28?> 29--EXPECT-- 30anythingInstance 31Foo::anythingStatic 32Bar::anythingStatic 33