3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $foo = ''; var_dump($foo['bar']);
based on cjq16
Output for 5.4.0 - 7.2.0
Warning: Illegal string offset 'bar' in /in/6hhJ5 on line 4 Notice: Uninitialized string offset: 0 in /in/6hhJ5 on line 4 string(0) ""
Output for 5.2.10 - 5.3.29
Notice: Uninitialized string offset: 0 in /in/6hhJ5 on line 4 string(0) ""
Output for 4.3.0 - 5.2.9
Notice: Uninitialized string offset: 0 in /in/6hhJ5 on line 4 string(0) ""