php convert string to method call

后端 未结 3 1595
臣服心动
臣服心动 2021-01-15 08:25


        
3条回答
  •  一向
    一向 (楼主)
    2021-01-15 08:40

    You can use the variable as a function name. This will execute getList():

    $str();
    

    However, stuff like this is mostly a symptom of a design problem. Care to elaborate what you need this for?

提交回复
热议问题