3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $var = 'string'; var_dump($var['ola']); $var = 'string'; if (isset($var) && ! is_string($var)) { var_dump($var['ola']); } else { var_dump($var); }
Output for 5.4.0 - 7.1.0
Warning: Illegal string offset 'ola' in /in/eLpBW on line 3 string(1) "s" string(6) "string"
Output for 4.3.0 - 5.3.29
string(1) "s" string(6) "string"