3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class test { function __toString() { return 'test'; } } var_dump([new test => 'test2']);
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.2.6
Warning: Illegal offset type in /in/6NvV9 on line 9 array(0) { }
Output for hhvm-3.15.4
Warning: Invalid operand type was used: Invalid type used as key in /in/6NvV9 on line 9 array(0) { }