3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $currentDate = strtotime('m/d/Y'); $start = strtotime('01-12-14'); $end = strtotime('02-12-14'); $timestamp = strtotime($currentDate); if($timestamp >= $start && $timestamp <= $end) { echo $currentDate; echo "The date $currentDate is within our date range\n"; } else { echo $currentDate; echo $start; echo $end; echo "The date $currentDate is NOT within our date range\n"; }
Output for 5.1.0 - 7.1.0
10082844001039820400The date is NOT within our date range
Output for 4.3.0 - 5.0.5
-110082844001039820400The date -1 is NOT within our date range