Dynamic class method invocation in PHP

后端 未结 8 1992
感动是毒
感动是毒 2020-11-28 05:05

Is there a way to dynamically invoke a method in the same class for PHP? I don\'t have the syntax right, but I\'m looking to do something similar to this:

$t         


        
8条回答
  •  情书的邮戳
    2020-11-28 05:20

    In my case.

    $response = $client->{$this->requestFunc}($this->requestMsg);
    

    Using PHP SOAP.

提交回复
热议问题