<?php
$array[something] = "Something is not a string. It's a constant. But because it's not found, PHP will assume you meant a string.";
//And if you error reporting is off, you'll never know.
echo $array[something];
Fatal error: Uncaught Error: Undefined constant "something" in /in/Q1ct4:3
Stack trace:
#0 {main}
thrown in /in/Q1ct4 on line 3
Process exited with code 255.
Warning: Use of undefined constant something - assumed 'something' (this will throw an Error in a future version of PHP) in /in/Q1ct4 on line 3
Warning: Use of undefined constant something - assumed 'something' (this will throw an Error in a future version of PHP) in /in/Q1ct4 on line 7
Something is not a string. It's a constant. But because it's not found, PHP will assume you meant a string.
Notice: Use of undefined constant something - assumed 'something' in /in/Q1ct4 on line 3
Notice: Use of undefined constant something - assumed 'something' in /in/Q1ct4 on line 7
Something is not a string. It's a constant. But because it's not found, PHP will assume you meant a string.