3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $record = [ [ firstname => 'Joe', lastname => 'McDonald' ] ]; echo $record[0][lastname];
based on ABOvH
Output for 7.2.0
Warning: Use of undefined constant firstname - assumed 'firstname' (this will throw an Error in a future version of PHP) in /in/ko98X on line 5 Warning: Use of undefined constant lastname - assumed 'lastname' (this will throw an Error in a future version of PHP) in /in/ko98X on line 5 Warning: Use of undefined constant lastname - assumed 'lastname' (this will throw an Error in a future version of PHP) in /in/ko98X on line 8 McDonald
Output for 5.5.0 - 7.1.10
Notice: Use of undefined constant firstname - assumed 'firstname' in /in/ko98X on line 5 Notice: Use of undefined constant lastname - assumed 'lastname' in /in/ko98X on line 5 Notice: Use of undefined constant lastname - assumed 'lastname' in /in/ko98X on line 8 McDonald