- Output for 7.1.25 - 7.1.27, 7.2.0 - 7.2.16, 7.3.0 - 7.3.3
- bool(false) bool(true) bool(false)
<?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);