Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
以下
$array = null; $array['xxx'] = 12; \var_dump($array);
出力します
array (size=1) 'xxx' => int 12
なんで?PHP にこれらをエラーとして報告させる方法はありますか?
$array['xxx'] = 12;
はヌル$array/未定義です。上記の代入は配列を作成し、次と同等です。
$array
$array = array('xxx' => 12);