3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $test = "test"; $obj = new stdclass(); var_dump($test[$obj]);
Output for 5.2.0 - 5.6.28, 7.0.0 - 7.1.0
Warning: Illegal offset type in /in/pjVWc on line 4 Notice: Object of class stdClass could not be converted to int in /in/pjVWc on line 4 string(1) "e"
Output for hhvm-3.10.0 - 3.12.0
Notice: String offset cast occurred in /in/pjVWc on line 4 Notice: Object of class stdClass could not be converted to int in /in/pjVWc on line 4 string(1) "e"
Output for 5.1.0 - 5.1.6
Notice: Object of class stdClass could not be converted to int in /in/pjVWc on line 4 string(1) "e"
Output for 5.0.0 - 5.0.5
string(1) "e"
Output for 4.3.0 - 4.4.9
string(1) "t"