3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $test_date = "08-02-2012"; $todays_date = date("d-m-Y"); var_dump(strtotime($test_date)); var_dump(strtotime($todays_date)); if (strtotime($test_date) < strtotime($todays_date)) { echo "Past"; } else { echo "Future"; } ?>
Output for 5.1.3 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
int(1328655600) int(1393455600) Past
Output for 5.1.0 - 5.1.2
bool(false) bool(false) Future
Output for 4.3.0 - 5.0.5
int(1375567200) int(1975356000) Past