3v4l.org

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

preferences:
48.03 ms | 402 KiB | 5 Q