3v4l.org

run code in 200+ PHP versions simultaneously
<?php echo PHP_VERSION; date_default_timezone_set('UTC'); $dti = new DateTimeImmutable('2012-01-01 00:00:00'); $dt = new DateTime('2012-01-01 00:01:00'); var_dump($dt->diff($dti), date_diff($dt, $dti));