3v4l.org

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

preferences:
37.3 ms | 402 KiB | 5 Q