3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $today_date = DateTime::createFromFormat('Y-m-d H:i:s', '2017-03-03 07:00:00'); $overdue_date = DateTime::createFromFormat('Y-m-d H:i:s', '2017-03-02 23:59:59'); var_dump(($today_date->format("Y-m-d H:i:s") <= $overdue_date->format("Y-m-d H:i:s"))); var_dump($today_date->diff($overdue_date)->days); if ($today_date->diff($overdue_date)->days == 1) { echo "Notify!"; } else { echo "Ndak di notify!"; }
based on 01CjK
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.3.0beta1
bool(false) int(0) Ndak di notify!