PHP中的“syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM”错误
class Test{
static function test_c(){
echo "test";
}
}
$class="Test";
$method="test_c";
$class::$method();
php5.3之前可以这样写:
class Test{
static function test_c(){
echo "test";
}
}
$class="Test";
$method="test_c";
eval("$class::$method();");
本文转自:http://blog.sina.com.cn/s/blog_97688f8e0101geff.html