3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tomorrow = new DateTimeImmutable('tomorrow'); // Will be midnight in the am $dayAfter = $tomorrow->add(new DateInterval('P1D')); // Will also be midnight $timestamp = time(); $isTomorrow = ($timestamp > $tomorrow->getTimestamp() && $dayAfter->getTimestamp() > $timestamp); var_dump($isTomorrow); $timestamp = $timestamp + (60 * 60 * 24); $isTomorrow = ($timestamp > $tomorrow->getTimestamp() && $dayAfter->getTimestamp() > $timestamp); var_dump($isTomorrow); $timestamp = $timestamp + (60 * 60 * 24); $isTomorrow = ($timestamp > $tomorrow->getTimestamp() && $dayAfter->getTimestamp() > $timestamp); var_dump($isTomorrow);

preferences:
38.2 ms | 402 KiB | 5 Q