3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $data = 'here\'s some data'; var_dump(isset($data['string'])); var_dump(isset($data['string'][0])); var_dump(isset($data[0][0])); var_dump(isset($data[0][0][0])); var_dump(isset($data[10][222][555])); var_dump(isset($data[1])); var_dump(isset($data[1][0]));
Output for 7.0.0 - 7.1.0
bool(false) bool(false) bool(true) bool(true) bool(false) bool(true) bool(true)
Output for 5.4.0 - 5.6.28
bool(false) bool(true) bool(true) bool(true) bool(false) bool(true) bool(true)
Output for 5.0.3 - 5.3.29
bool(true) bool(false) bool(false) Fatal error: Cannot use string offset as an array in /in/gNqXR on line 8
Process exited with code 255.
Output for 5.0.0 - 5.0.2
bool(false) bool(false) bool(false) Fatal error: Cannot use string offset as an array in /in/gNqXR on line 8
Process exited with code 255.
Output for 4.3.0 - 4.4.9
bool(true) bool(false) bool(false) bool(false) bool(false) bool(true) bool(false)