3v4l.org

run code in 200+ php & hhvm versions
<?php $a=['foo'=>123]; echo "lalala {$a[foo]} bar";
based on uUEW0
Output for 7.2.0 - 7.2.8
Warning: Use of undefined constant foo - assumed 'foo' (this will throw an Error in a future version of PHP) in /in/dKU7d on line 5 lalala 123 bar
Output for 5.6.30, hhvm-3.18.5 - 3.21.3, 7.0.30 - 7.1.20
Notice: Use of undefined constant foo - assumed 'foo' in /in/dKU7d on line 5 lalala 123 bar
Output for hhvm-3.22.0
Notice: Use of undefined constant foo - assumed 'foo' in /in/dKU7d on line -1 lalala 123 bar