3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $obj = new stdClass; $obj->foo = 123; $obj->bar = 456; $s = serialize($obj); var_dump($obj); var_dump($s); var_dump(unserialize($s));
Output for 5.0.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
object(stdClass)#1 (2) { ["foo"]=> int(123) ["bar"]=> int(456) } string(51) "O:8:"stdClass":2:{s:3:"foo";i:123;s:3:"bar";i:456;}" object(stdClass)#2 (2) { ["foo"]=> int(123) ["bar"]=> int(456) }
Output for 4.3.0 - 4.4.9
object(stdClass)(2) { ["foo"]=> int(123) ["bar"]=> int(456) } string(51) "O:8:"stdClass":2:{s:3:"foo";i:123;s:3:"bar";i:456;}" object(stdClass)(2) { ["foo"]=> int(123) ["bar"]=> int(456) }