3v4l.org

run code in 300+ PHP versions simultaneously
<?php class human{ public $x = null; protected static function t(){ echo "sdffffffff"; } //魔术方法__call /* $method 获得方法名 $arg 获得方法的参数集合 */ public static function __callStatic($method,$arg){ echo '你想调用我不存在的方法',$method,'方法<br/>'; echo '还传了一个参数<br/>'; echo print_r($arg),'<br/>'; $reflect = new ReflectionMethod($this, $method); var_dump($reflect->isPublic()); self::$method(); } } human::t(1,2,3); $li=new human(); $li->t(1,2,3);

preferences:
59.81 ms | 402 KiB | 5 Q