我是 PHP 新手,读过一个教程,但我不明白代码中的某些内容:
什么时候这意味着什么$names = [];是在 PHP 脚本中吗?
$names = [];
它等同于array()。此语法自 PHP 5.4 起有效。
array()
$array = [1, 2, 3, 4];