3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $interval = "00:00-23:59"; $pickup_time = "2014-05-08 23:58:00"; $interval = explode("-",$interval); $start = str_replace (":", "", $interval[0]); $end = str_replace (":", "", $interval[1]); $pickup_time = (int) date('Gi', strtotime($pickup_time)); if ($pickup_time >= $start && $pickup_time <= $end ){ return true; }else{ return false; }
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0