3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class SomeCollection extends ArrayObject {} $meh = new SomeCollection(); $meh[] = 'item'; echo serialize($meh);
Output for 5.3.0 - 7.1.0
C:14:"SomeCollection":36:{x:i:0;a:1:{i:0;s:4:"item";};m:a:0:{}}
Output for 5.0.0 - 5.2.17
O:14:"SomeCollection":1:{i:0;s:4:"item";}
Output for 4.3.2 - 4.4.9
Fatal error: Class somecollection: Cannot inherit from undefined class arrayobject in /in/TLI6Y on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Class somecollection: Cannot inherit from undefined class arrayobject in /in/TLI6Y on line 3