jjzjj

lastCalledParam

全部标签

php - 在 PHP 中创建和使用魔术方法

我正在努力掌握PHP的神奇方法,为此我创建了一个如下所示的测试类:switchConstruct(func_get_args());}protectedfunctionswitchConstruct(array$args){switch(count($args)){case0:returnprint"0params";case1:returncall_user_func_array(array($this,'constr1'),$args);case2:returncall_user_func_array(array($this,'constr2'),$args);}die("Inva