aca*_*rns 9 php arrays string class constants
谁能告诉我为什么这不起作用?这只是我在其他地方尝试做的一个粗略的例子.
$stuff = array(
'key' => __DIR__ . 'value'
);
Run Code Online (Sandbox Code Playgroud)
但是,这会产生错误:
PHP Parse error: syntax error, unexpected '.', expecting ')' in /var/www/.../testing.php on line 6
Run Code Online (Sandbox Code Playgroud)
此外,这有效:
$stuff = array(
'key' => "{__DIR__} value"
);
Run Code Online (Sandbox Code Playgroud)