- var_dump: documentation ( source)
- print_r: documentation ( source)
<?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);