Paste Search Dynamic
Recent pastes
time
  1. <?php
  2.  
  3. function t($time) {
  4.    
  5.     return strtotime("1970-01-01 $time UTC");
  6. }
  7. $A = t("7:15");
  8. $B = t("7:30");
  9. $S = 3600;
  10. $D = ($B - $A) % $S;
  11.  
  12.  
  13. if($D > 0) {
  14.         echo "A ";
  15.     echo ($B + $S - $D) /3600;
  16. } else {
  17.         echo "B ";
  18.     echo $B;
  19. }
  20. ?>
Parsed in 0.008 seconds