3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = new DateTimeImmutable(); $b = new DateTimeImmutable('yesterday'); $c = array($a, $b); $d = max($c); var_dump($d);

preferences:
42.12 ms | 402 KiB | 5 Q