3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $x='a'; $x[new stdClass];
Output for 5.4.0 - 7.1.7
Warning: Illegal offset type in /in/jLFJF on line 3 Notice: Object of class stdClass could not be converted to int in /in/jLFJF on line 3 Notice: Uninitialized string offset: 1 in /in/jLFJF on line 3
Output for 5.2.0 - 5.3.29
Warning: Illegal offset type in /in/jLFJF on line 3 Notice: Object of class stdClass could not be converted to int in /in/jLFJF on line 3
Output for 5.1.0 - 5.1.6
Notice: Object of class stdClass could not be converted to int in /in/jLFJF on line 3
Output for 4.3.0 - 5.0.5