3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $thing=array( array( name => "arthur", id => "1", blah => 1.0 ), array( name => "bob", id => "2", blah => 3.0 ) ); print_R($thing); ?>
Output for 7.2.0 - 7.3.0rc3
Warning: Use of undefined constant name - assumed 'name' (this will throw an Error in a future version of PHP) in /in/4j9LU on line 3 Warning: Use of undefined constant id - assumed 'id' (this will throw an Error in a future version of PHP) in /in/4j9LU on line 4 Warning: Use of undefined constant blah - assumed 'blah' (this will throw an Error in a future version of PHP) in /in/4j9LU on line 5 Warning: Use of undefined constant name - assumed 'name' (this will throw an Error in a future version of PHP) in /in/4j9LU on line 7 Warning: Use of undefined constant id - assumed 'id' (this will throw an Error in a future version of PHP) in /in/4j9LU on line 8 Warning: Use of undefined constant blah - assumed 'blah' (this will throw an Error in a future version of PHP) in /in/4j9LU on line 9 Array ( [0] => Array ( [name] => arthur [id] => 1 [blah] => 1 ) [1] => Array ( [name] => bob [id] => 2 [blah] => 3 ) )
Output for 5.6.30, hhvm-3.18.5 - 3.21.3, 7.0.30 - 7.1.20
Notice: Use of undefined constant name - assumed 'name' in /in/4j9LU on line 3 Notice: Use of undefined constant id - assumed 'id' in /in/4j9LU on line 4 Notice: Use of undefined constant blah - assumed 'blah' in /in/4j9LU on line 5 Notice: Use of undefined constant name - assumed 'name' in /in/4j9LU on line 7 Notice: Use of undefined constant id - assumed 'id' in /in/4j9LU on line 8 Notice: Use of undefined constant blah - assumed 'blah' in /in/4j9LU on line 9 Array ( [0] => Array ( [name] => arthur [id] => 1 [blah] => 1 ) [1] => Array ( [name] => bob [id] => 2 [blah] => 3 ) )
Output for hhvm-3.22.0
Notice: Use of undefined constant name - assumed 'name' in /in/4j9LU on line -1 Notice: Use of undefined constant id - assumed 'id' in /in/4j9LU on line -1 Notice: Use of undefined constant blah - assumed 'blah' in /in/4j9LU on line -1 Notice: Use of undefined constant name - assumed 'name' in /in/4j9LU on line -1 Notice: Use of undefined constant id - assumed 'id' in /in/4j9LU on line -1 Notice: Use of undefined constant blah - assumed 'blah' in /in/4j9LU on line -1 Array ( [0] => Array ( [name] => arthur [id] => 1 [blah] => 1 ) [1] => Array ( [name] => bob [id] => 2 [blah] => 3 ) )