3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $savethis; public $andthis; public $notthis; public function __construct($a, $b) { $this->savethis = $a; $this->andthis = $b; $this->notthis = microtime(true); } public function __sleep() { return ['savethis', 'andthis']; } public function __wakeup() { $this->notthis = microtime(true); } } $f = new Foo(1, 2); var_dump($f, $g = serialize($f), unserialize($g));

preferences:
56.14 ms | 1146 KiB | 5 Q