3v4l.org

run code in 300+ PHP versions simultaneously
<?php class SomeCollection extends ArrayObject {} $meh = unserialize('O:14:"SomeCollection":1:{i:0;s:4:"item";}'); var_dump('yay', $meh[0]); $meh = unserialize('C:14:"SomeCollection":36:{x:i:0;a:1:{i:0;s:4:"item";};m:a:0:{}}'); var_dump('yay', $meh[0]);
Output for 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.27, 8.2.0 - 8.2.17, 8.3.0 - 8.3.4
Fatal error: Uncaught UnexpectedValueException: Incomplete or ill-typed serialization data in /in/angCR:6 Stack trace: #0 [internal function]: ArrayObject->__unserialize(Array) #1 /in/angCR(6): unserialize('O:14:"SomeColle...') #2 {main} thrown in /in/angCR on line 6
Process exited with code 255.
Output for 5.4.29, 7.3.32 - 7.3.33
Warning: Erroneous data format for unserializing 'SomeCollection' in /in/angCR on line 6 string(3) "yay" NULL string(3) "yay" string(4) "item"
Output for 5.5.13, 5.6.0 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.7, 7.2.29 - 7.2.33, 7.3.12 - 7.3.31
Warning: Erroneous data format for unserializing 'SomeCollection' in /in/angCR on line 6 Notice: unserialize(): Error at offset 25 of 41 bytes in /in/angCR on line 6 string(3) "yay" NULL string(3) "yay" string(4) "item"
Output for 5.5.0 - 5.5.12, 5.5.14 - 5.5.35
Notice: Undefined offset: 0 in /in/angCR on line 7 string(3) "yay" NULL string(3) "yay" string(4) "item"
Output for 5.3.9 - 5.3.29, 5.4.0 - 5.4.28, 5.4.30 - 5.4.45
string(3) "yay" NULL string(3) "yay" string(4) "item"
Output for 5.3.0 - 5.3.8
string(3) "yay" string(4) "item" string(3) "yay" string(4) "item"
Output for 5.2.3 - 5.2.17
string(3) "yay" string(4) "item" Warning: Class SomeCollection has no unserializer in /in/angCR on line 8 string(3) "yay" NULL
Output for 5.1.0 - 5.1.6, 5.2.0 - 5.2.2
string(3) "yay" string(4) "item" <br /> <b>Warning</b>: Class SomeCollection has no unserializer in <b>/in/angCR</b> on line <b>8</b><br /> string(3) "yay" NULL
Output for 5.0.0 - 5.0.5
string(3) "yay" string(4) "item" string(3) "yay" NULL
Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.9
<br /> <b>Fatal error</b>: Class somecollection: Cannot inherit from undefined class arrayobject in <b>/in/angCR</b> on line <b>3</b><br />
Process exited with code 255.
Output for 4.3.0 - 4.3.1
<br /> <b>Fatal error</b>: Class somecollection: Cannot inherit from undefined class arrayobject in <b>/in/angCR</b> on line <b>3</b><br />

preferences:
262.19 ms | 401 KiB | 338 Q