[Solved] Is Putting Quotes on PHP Named Indexes Unnecessary?
Your first example should throw a NOTICE. If you do not use quotes then PHP will look for a constant with that name. php > $myArr = [abc => ‘hello’]; PHP Notice: Use of undefined constant abc – assumed ‘abc’ in php shell code on line 1 PHP Stack trace: PHP 1. {main}() php shell … Read more