3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $start = new \DateTime('01.10.2015'); $end = new \DateTime('08.10.2015'); $endYesterday = new \DateTime('07.10.2015'); $today = new \DateTime('midnight'); var_dump($today >= $start && $today <= $end); var_dump($today >= $start && $today <= $endYesterday);
based on M9Ghv
Output for 5.4.8 - 5.4.45, 5.6.28, 7.0.20 - 7.2.0
bool(true) bool(false)
Output for 5.3.18 - 5.4.7, 5.5.24 - 5.6.21, 7.0.0 - 7.0.6
bool(false) bool(false)