3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $wat1 = "wat"; $wat1[3] = "z"; var_dump($wat1); $wat2 = "wat"; $wat2[4] = "z"; var_dump($wat2); $wat3 = "wat"; $wat3[50] = "z"; var_dump($wat3);
Output for 4.3.0 - 5.2.9, 5.2.12 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
string(4) "watz" string(5) "wat z" string(51) "wat z"
Output for 5.2.10 - 5.2.11
Notice: Uninitialized string offset: 3 in /in/BiFt4 on line 4 string(4) "watz" Notice: Uninitialized string offset: 4 in /in/BiFt4 on line 8 string(5) "wat z" Notice: Uninitialized string offset: 50 in /in/BiFt4 on line 12 string(51) "wat z"