3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $test = '123'; var_dump($test{0}); var_dump($test{1}); var_dump($test{2}); var_dump($test{3}); var_dump($test{4});
Output for 5.2.10 - 7.2.0
string(1) "1" string(1) "2" string(1) "3" Notice: Uninitialized string offset: 3 in /in/vOu5e on line 8 string(0) "" Notice: Uninitialized string offset: 4 in /in/vOu5e on line 9 string(0) ""
Output for 4.3.0 - 5.2.9
string(1) "1" string(1) "2" string(1) "3" Notice: Uninitialized string offset: 3 in /in/vOu5e on line 8 string(0) "" Notice: Uninitialized string offset: 4 in /in/vOu5e on line 9 string(0) ""