3v4l.org

run code in 300+ PHP versions simultaneously
<?php date_default_timezone_set(); $timeNow = strtotime(date('h:i')); $lastShip = strtotime('15:00'); $diff = $lastShip - $timeNow; if($diff){ $shippingResult ='Only '.date('h', $diff).' hours and '.date('i', $diff).' minutes to to get same day dispatch'; }else{ #do nothing.date('H:i', $diff) } echo $shippingResult;

preferences:
41.18 ms | 402 KiB | 5 Q