3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $x = new \StdClass(); var_dump(array($x => 1));
Output for 5.3.0 - 7.2.0
Warning: Illegal offset type in /in/D86Db on line 3 array(0) { }
Output for 4.3.9 - 5.2.17
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/D86Db on line 2 Warning: Illegal offset type in /in/D86Db on line 3 array(0) { }
Output for 4.3.0 - 4.3.8
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/D86Db on line 2 array(0) { }