3v4l.org

run code in 300+ PHP versions simultaneously
<?php // your first date coming from a mysql database (date fields) $dateA = '2013-11-11 23:10:30'; // your second date coming from a mysql database (date fields) $dateB = '2013-11-11 16:27:21'; $timediff = strtotime($dateA) - strtotime($dateB); if($timediff > 86400){ echo 'more than 24 hours'; } else { echo 'less than 24 hours'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 14
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tP8Na
function name:  (null)
number of ops:  16
compiled vars:  !0 = $dateA, !1 = $dateB, !2 = $timediff
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '2013-11-11+23%3A10%3A30'
    5     1        ASSIGN                                                   !1, '2013-11-11+16%3A27%3A21'
    7     2        INIT_FCALL                                               'strtotime'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $5      
          5        INIT_FCALL                                               'strtotime'
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                         $6      
          8        SUB                                              ~7      $5, $6
          9        ASSIGN                                                   !2, ~7
    9    10        IS_SMALLER                                               86400, !2
         11      > JMPZ                                                     ~9, ->14
   10    12    >   ECHO                                                     'more+than+24+hours'
         13      > JMP                                                      ->15
   14    14    >   ECHO                                                     'less+than+24+hours'
   15    15    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.02 ms | 1386 KiB | 15 Q