期权路,上证50ETF期权 众说纷纭期权路,遥遥无期空杯想

PHP对象不存在call()、callStatic()

call()

  在对象中调用一个不可访问方法时,__call()会被调用

callStatic()

  在静态上下文中调用一个不可访问方法时,__callStatic()会被调用

<?php  class MethodTest   {      public function __call($name, $arguments)       {          echo "Calling object method '$name' "               . implode(', ', $arguments). "\n";      }      public static function __callStatic($name, $arguments)       {          echo "Calling static method '$name' "               . implode(', ', $arguments). "\n";      }  }  $obj = new MethodTest;  //Calling object method 'runTest' in object context  $obj->runTest('in object context');  //Calling static method 'runTest' in static context  MethodTest::runTest('in static context');    ?>

原文链接:https://www.qiquanji.com/post/7987.html

本站声明:网站内容来源于网络,如有侵权,请联系我们,我们将及时处理。

作者:xiaojiucai 分类:期权知识 浏览: