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]);
Output for 7.0.0 - 7.1.0
bool(true) bool(false) Fatal error: Uncaught Error: Cannot unset string offsets in /in/n63dl:4 Stack trace: #0 {main} thrown in /in/n63dl on line 4
Process exited with code 255.
Output for 5.0.0 - 5.6.28
bool(true) bool(false) Fatal error: Cannot unset string offsets in /in/n63dl on line 4
Process exited with code 255.
Output for 4.3.3 - 4.4.9
bool(true) bool(false)
Output for 4.3.0 - 4.3.2
Notice: Uninitialized string offset: 997 in /in/n63dl on line 3 bool(true) bool(false)