3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class a { public $b = 1; } $a = new A; var_dump($a); var_dump(unserialize(serialize($a))); var_dump(json_decode(json_encode($a)));
based on DAKnB
Output for 5.5.0 - 7.3.1
object(a)#1 (1) { ["b"]=> int(1) } object(a)#2 (1) { ["b"]=> int(1) } object(stdClass)#2 (1) { ["b"]=> int(1) }