3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $var = "1905"; if(isset($var['ampm'])){ print "entra"; }else{ print "no entra"; } var_dump($var['ampm']); print $var['ampm'];
Output for 5.4.0 - 7.1.0
no entra Warning: Illegal string offset 'ampm' in /in/rThgU on line 8 string(1) "1" Warning: Illegal string offset 'ampm' in /in/rThgU on line 9 1
Output for 4.3.0 - 4.4.9, 5.0.3 - 5.3.29
entrastring(1) "1" 1
Output for 5.0.0 - 5.0.2
no entrastring(1) "1" 1