3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $string = "foobar"; var_dump(isset($string[1]), isset($string[997])); unset($string[1]); unset($string[997]); var_dump(bin2hex($string));
Output for 7.0.0 - 7.1.0
bool(true) bool(false) Fatal error: Uncaught Error: Cannot unset string offsets in /in/FroWn:4 Stack trace: #0 {main} thrown in /in/FroWn on line 4
Process exited with code 255.
Output for 5.0.0 - 5.6.28, hhvm-3.10.0 - 3.12.0
bool(true) bool(false) Fatal error: Cannot unset string offsets in /in/FroWn on line 4
Process exited with code 255.
Output for 4.3.3 - 4.4.9
bool(true) bool(false) string(12) "666f6f626172"
Output for 4.3.0 - 4.3.2
Notice: Uninitialized string offset: 997 in /in/FroWn on line 3 bool(true) bool(false) string(12) "666f6f626172"