3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test implements Serializable { public $test; public $test2; public function serialize() { $this->test = "cccc"; return serialize($this); } } $o = new Test(); $o->test = "aaaa"; $o->test2 = "bbbbb"; echo serialize($o);

preferences:
49.59 ms | 402 KiB | 5 Q