3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $expected_array_got_string = 'test'; var_dump(isset($expected_array_got_string['jkjk'])); var_dump(isset($expected_array_got_string['jkjk'][0])); var_dump(isset($expected_array_got_string['jkjk'][0]['test'])); var_dump(isset($expected_array_got_string['jkjk']['test'][1])); var_dump(isset($expected_array_got_string['jkjk']['test'][0]));
Output for 7.0.0 - 7.2.0
bool(false) bool(false) bool(false) bool(false) bool(false)
Output for 5.4.11 - 5.6.28
bool(false) bool(true) bool(false) bool(false) bool(true)
Output for 5.3.21 - 5.3.29
bool(true) bool(false) Fatal error: Cannot use string offset as an array in /in/mctVq on line 6
Process exited with code 255.