3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $foo = 'foo'; $bar = array(1,2); echo $foo[$bar];
Output for 5.2.0 - 5.6.28, 7.0.0 - 7.1.0
Warning: Illegal offset type in /in/cPRgU on line 4 o
Output for hhvm-3.10.0 - 3.12.0
Notice: String offset cast occurred in /in/cPRgU on line 4 o
Output for 4.3.0 - 5.1.6
o