3v4l.org

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