PHP 连贯操作

method_x(substr($method,6)); } } function method1() { $this->i+=1; return $this; } function method2() { $this->i+=2; return $this; } function method_x() { $args=func_get_arg(0); $this->i+=$args; return $this; } } $test=new myoop(); echo $test->method1()->method2()->method88881()->i; ?> 个人理解
原文地址:https://www.cnblogs.com/cnsanshao/p/2154794.html