3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $foo = ''; echo $foo['bar'];
Output for 5.4.0 - 7.2.0
Warning: Illegal string offset 'bar' in /in/KMjh1 on line 3 Notice: Uninitialized string offset: 0 in /in/KMjh1 on line 3
Output for 5.2.10 - 5.3.29
Notice: Uninitialized string offset: 0 in /in/KMjh1 on line 3
Output for 4.3.0 - 5.2.9
Notice: Uninitialized string offset: 0 in /in/KMjh1 on line 3