3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $hash = new SplObjectStorage(); $hash[new ArrayObject(array(1, 2, 'three'))] = "jim jones"; echo $hash[new ArrayObject(array(1, 2, 'three'))]; ?>
based on sIk08
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught UnexpectedValueException: Object not found in /in/nsj6t:7 Stack trace: #0 /in/nsj6t(7): SplObjectStorage->offsetGet(Object(ArrayObject)) #1 {main} thrown in /in/nsj6t on line 7
Process exited with code 255.
Output for 5.5.0 - 5.6.28
Fatal error: Uncaught exception 'UnexpectedValueException' with message 'Object not found' in /in/nsj6t:7 Stack trace: #0 /in/nsj6t(7): SplObjectStorage->offsetGet(Object(ArrayObject)) #1 {main} thrown in /in/nsj6t on line 7
Process exited with code 255.