3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class obj { var $prop; function __wakeup() { $this->prop = 'prop'; } } $x = 'a:3:{i:0;O:8:"stdClass":2:{i:0;a:1:{i:0;i:1;}i:0;i:1;}i:1;O:3:"obj":1:{s:4:"prop";i:2;}i:2;R:3;}'; $y = unserialize($x); var_dump($y);
based on Qb35E
Output for 7.0.0 - 7.2.0
array(3) { [0]=> object(stdClass)#1 (1) { ["0"]=> &int(1) } [1]=> object(obj)#2 (1) { ["prop"]=> string(4) "prop" } [2]=> &int(1) }
Output for 5.4.37 - 5.6.28
array(3) { [0]=> object(stdClass)#1 (1) { ["0"]=> int(1) } [1]=> object(obj)#2 (1) { ["prop"]=> string(4) "prop" } [2]=> array(1) { [0]=> int(1) } }
Output for 5.4.2 - 5.4.11, 5.4.13, 5.4.15 - 5.4.36
array(3) { [0]=> object(stdClass)#1 (1) { ["0"]=> int(1) } [1]=> object(obj)#2 (1) { ["prop"]=> string(4) "prop" } [2]=> &UNKNOWN:0 }
Process exited with code 139.
Output for 5.4.14
array(3) { [0]=> object(stdClass)#1 (1) { ["0"]=> int(1) } [1]=> object(obj)#2 (1) { ["prop"]=> string(4) "prop" } [2]=> &NULL }
Process exited with code 139.
Output for 5.4.12
array(3) { [0]=> object(stdClass)#1 (1) { ["0"]=> int(1) } [1]=> object(obj)#2 (1) { ["prop"]=> string(4) "prop" } [2]=> &float(6.8996019938383E-310) }
Process exited with code 139.
Output for 5.3.18 - 5.3.29
array(3) { [0]=> object(stdClass)#1 (1) { ["0"]=> int(1) } [1]=> object(obj)#2 (1) { ["prop"]=> &string(4) "prop" } [2]=> &string(4) "prop" }