我想以类名和方法名是变量的方式调用静态方法。
例子:
class QQQ {
public function www($x) {
echo $x;
}
}
$q = 'QQQ';
$w = 'www';
$q::$w(7); // this is what I am trying to do but it throws an error.
想法?
我想以类名和方法名是变量的方式调用静态方法。
例子:
class QQQ {
public function www($x) {
echo $x;
}
}
$q = 'QQQ';
$w = 'www';
$q::$w(7); // this is what I am trying to do but it throws an error.
想法?