3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $string = "hello"; $string[10] = $string[10]; var_dump($string);
Output for 7.1.0 - 7.2.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 - 7.0.20
Notice: Uninitialized string offset: 10 in /in/J6d9s on line 3 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 "