3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $string = "hello"; $string[10] = $string[10]; var_dump($string);
Output for 7.1.0
Notice: Uninitialized string offset: 10 in /in/J6d9s on line 3 Warning: Cannot assign an empty string to a string offset in /in/J6d9s on line 3 string(5) "hello"
Output for 5.2.12 - 5.6.28, 7.0.0 - 7.0.14
Notice: Uninitialized string offset: 10 in /in/J6d9s on line 3 string(11) "hello "
Output for hhvm-3.10.0 - 3.12.0
string(11) "hello "
Output for 5.2.10 - 5.2.11
Notice: Uninitialized string offset: 10 in /in/J6d9s on line 3 Notice: Uninitialized string offset: 10 in /in/J6d9s on line 3 string(11) "hello "
Output for 4.3.0 - 5.2.9
Notice: Uninitialized string offset: 10 in /in/J6d9s on line 3 string(11) "hello "