含まれていますアレイ/クラス定数式では、これが動作しない理由を私は理解できない不正な操作
class TestOne
{
public static $TEST = array(
"test" => array("name" => TestTwo::$TEST2[ "test" ]) // error line
)}
class TestTwo
{
public static $TEST2 = array(
"test" => "result"
);
}
これは私にエラーを与える:
Constant expression contains invalid operations
私はTestOne::$TEST[ "test" ][ "name" ]
が含まれているしたいと思います」結果 "
PHPバージョン?ここで使用されます。 – JustOnUnderMillions
私は7.1.1を使用しています –