3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?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];
Output for 7.2.0
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.
Output for 4.3.0 - 7.1.10
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.