【发布时间】:2017-06-18 10:28:42
【问题描述】:
我不明白为什么这不起作用:
class TestOne
{
public static $TEST = array(
"test" => array( "name" => TestTwo::$TEST2[ "test" ] ) // error line
)}
class TestTwo
{
public static $TEST2 = array(
"test" => "result"
);
}
这给了我错误:
常量表达式包含无效操作
我希望TestOne::$TEST[ "test" ][ "name" ] 包含“结果”
【问题讨论】:
-
PHP 版本?在这里使用。