3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Test { function __toString() { return 'Test'; } } $a = array('Test' => 'foo'); $b = new Test(); var_dump($a[$b]);
Output for 4.3.0 - 7.1.0
Warning: Illegal offset type in /in/GQNUb on line 12 NULL