问答详情
源自:5-3 魔术方法之__call和__callStatic方法

public function __call

public function __call($name,$arguments){

echo "calling ".$name."witi parament:".implode(",",$arguments)."\n";

}

Parse error: syntax error, unexpected 'public' (T_PUBLIC) in D:\wamp64\www\Study\magicTest.php on line 12

PHP Parse error:  syntax error, unexpected 'public' (T_PUBLIC) in D:\wamp64\www\Study\magicTest.php on line 12

[Finished in 0.2s]    



提问者:烧皮 2018-08-17 16:22

个回答

  • 烧皮
    2018-08-17 16:27:49

    找到了 把方法放类外面了

  • 烧皮
    2018-08-17 16:26:27

    找到了 把方法放类里面了