Yes.
If you pass an argument to an array without quotes, php will first try to interpret the argument as a constant, and if it is not defined, it will act as expected. Even if he can give the same result, he is much slower than the argument given.
Here is an example of when this might not work:
define("a_constant","a value");
$a = array("a_constant"=>"the right value");
echo $a[a_constant];
The variable a_constanthas a value of "value", so $a[a_constant]it goes into $a["a value"], a key that does not exist in the array $a.
source
share