3v4l.org

run code in 300+ PHP versions simultaneously
<?php date_default_timezone_set('Europe/Minsk'); $a = new DateTimeImmutable("2015-01-01 11:00:00"); $daySchedule = [ 'from' => '10:00+03:00', 'till' => '21:00+03:00', ]; $b = $a->setTime(10, 0)->setTimezone("+03:00"); var_dump($a > $b, $a, $b); var_dump($a->getTimestamp()); var_dump($b->getTimestamp()); var_dump($a > $b, $a, $b);

preferences:
54.35 ms | 402 KiB | 5 Q