$name = self::$name; echo "Hi, {$prefix} {$name}!" . EOL; } } echo "Test1" . EOL; $test = Hello::getIns("xiaohong"); $say1 = new ProxyMethod($test); $say1->hi("Miss."); // Hi, Miss. xiaohong! $say1::hello("Miss."); // Hello, Miss. xiaohong! $say1->test(); // test inheritance $say1::staticTest(); // test inheritance, static $say1->export("hello"); $say1->export("hi"); hi($test, "Miss."); // Hi, Miss. xiaohong! hello("Miss."); // Hello, Miss. xiaohong! echo EOL2; echo "Test2" . EOL; $say2 = new ProxyMethod("Hello", "xiaoming"); $say2->hi("Mr."); // Hi, Mr. xiaoming! $say2::hello("Mr."); // Hello, Mr. xiaoming! $say2->test(); // test inheritance $say2::staticTest();