3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class c1 { public $a = 1; public $b = 2; } class c2 implements Serializable { public function serialize() { return 's:1:"a";i:1;s:1:"b";i:2;'; } public function unserialize($str) {} } $o1 = new c1; $o2 = new c2; echo serialize($o1) . "\n"; echo serialize($o2) . "\n";