我无法理解关联数组的最后一个值'changes' => [ ],
。
$table_report = array(
'table_name' => $table,
'rows' => 0,
'change' => 0,
'changes' => [ ],
);
答案 0 :(得分:3)
[]
是PHP 5.4中引入的array()
的替代语法
[]
只是一个空数组。
此
$table_report = array(
'table_name' => $table,
'rows' => 0,
'change' => 0,
'changes' => array()
);
相当于
$table_report = [
'table_name' => $table,
'rows' => 0,
'change' => 0,
'changes' => []
];