3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $x='a'; $x[new stdClass];
Output for 5.4.0 - 5.6.22, 7.0.0 - 7.1.0
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 hhvm-3.10.0 - 3.12.0
Notice: String offset cast occurred 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.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