をしようとPHPません:アレイは5.6でダンプが、5.5.9
はvar_dump(Map::map);
PHP 5.5.9で、これは私の 解析エラー与える:構文エラー、予期しない、期待して ']' map.phpに '' (これは、以下の配列宣言の最初の連結記号です)
PHP 5.6では、警告または通知なしで配列をダンプします。
class Map
{
const map = [
'admin' => [
'' => __DIR__ . 'somefile.php'],
'resa' => __DIR__ . 'somefile.php',
'galleri' => __DIR__ . 'somefile.php',
'kategori' => __DIR__ . 'somefile.php',
'' => [
'' => __DIR__ . 'somefile.php',
'katalog' => __DIR__ . 'somefile.php',
'resan' => __DIR__ . 'somefile.php',
'bussresor' => __DIR__ . 'somefile.php',
'kontakt' => __DIR__ . 'somefile.php'],
'ajax' => __DIR__ . 'somefile.php',
'test' => [
'' => __DIR__ . 'somefile.php',
'test1sub' => __DIR__ . 'somefile.php',
'test2' => [
'' => __DIR__ . 'somefile.php',
'test2sub' => __DIR__ . 'somefile.php',
'test3' => [
'' => __DIR__ . 'somefile.php',
'test3sub' => __DIR__ . 'somefile.php'
]
]
]
];
}
http://php.net/manual/en/migration56.new-features.php#migration56.new-features.const-scalar-exprs –