run code in 150+ php & hhvm versions
Bugs & Features
<?php class Test { } $a = array('Test' => 'foo'); $b = new Test(); var_dump($a[$b]);
Output for 4.3.0 - 5.6.21, 7.0.0 - 7.1.0RC4
Warning: Illegal offset type in /in/o8VHf on line 10 NULL
Output for hhvm-3.12.0
Warning: Invalid operand type was used: Invalid type used as key in /in/o8VHf on line 10 Catchable fatal error: Object of class Test could not be converted to string in /in/o8VHf on line 10
Process exited with code 255.
Output for hhvm-3.10.0

Process exited with code 153.