标签: php oop
我如何使用以下内容:
$parameter = "get_something()"; $value = $this->method->$parameter;
我收到错误“undefined property $ get_something()”(注意$)。
答案 0 :(得分:4)
尝试使用
$name = "get_something"; $value = $this->method->$name();
代替