3v4l.org

run code in 300+ PHP versions simultaneously
<?php $start = new DateTime('yesterday'); $serialized = array( 'class' => get_class($start), 'state' => (array) $start ); unset($start); if (is_callable(array($serialized['class'], '__set_state'))) { var_dump($serialized['class']::__set_state($serialized['state'])); }

preferences:
50.41 ms | 402 KiB | 5 Q