3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $string = 'cba'; var_dump(isset($string['test'])); // true var_dump(!empty($string['test'])); //true var_dump($string['test']); // a
Output for 5.4.0 - 7.1.0
bool(false) bool(false) Warning: Illegal string offset 'test' in /in/GdhWZ on line 6 string(1) "c"
Output for 4.3.0 - 4.4.9, 5.0.3 - 5.0.5, 5.1.1 - 5.3.29
bool(true) bool(true) string(1) "c"
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/GdhWZ on line 6
Process exited with code 255.
Output for 5.0.0 - 5.0.2
bool(false) bool(false) string(1) "c"