3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo $phpdate = strtotime('+2 day'); echo PHP_EOL; echo $mysqldate = date('Y-m-d H:i:s', $phpdate); echo PHP_EOL; $last_access = $phpdate; $now = time(); echo $last_midnight = $now - ($now % (24*60*60)); echo PHP_EOL; echo strtotime('today'); echo PHP_EOL; if ($last_access >= $last_midnight) { print "Today"; } elseif ($last_access >= ($last_midnight-(24*60*60))) { print "Yesterday"; } else{print 'AAAA';} ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 29, Position 2 = 31
Branch analysis from position: 29
1 jumps found. (Code = 42) Position 1 = 37
Branch analysis from position: 37
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 31
2 jumps found. (Code = 43) Position 1 = 34, Position 2 = 36
Branch analysis from position: 34
1 jumps found. (Code = 42) Position 1 = 37
Branch analysis from position: 37
Branch analysis from position: 36
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2cij7
function name:  (null)
number of ops:  38
compiled vars:  !0 = $phpdate, !1 = $mysqldate, !2 = $last_access, !3 = $now, !4 = $last_midnight
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL                                               'strtotime'
          1        SEND_VAL                                                 '%2B2+day'
          2        DO_ICALL                                         $5      
          3        ASSIGN                                           ~6      !0, $5
          4        ECHO                                                     ~6
    5     5        ECHO                                                     '%0A'
    6     6        INIT_FCALL                                               'date'
          7        SEND_VAL                                                 'Y-m-d+H%3Ai%3As'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $7      
         10        ASSIGN                                           ~8      !1, $7
         11        ECHO                                                     ~8
    7    12        ECHO                                                     '%0A'
   10    13        ASSIGN                                                   !2, !0
   13    14        INIT_FCALL                                               'time'
         15        DO_ICALL                                         $10     
         16        ASSIGN                                                   !3, $10
   15    17        MOD                                              ~12     !3, 86400
         18        SUB                                              ~13     !3, ~12
         19        ASSIGN                                           ~14     !4, ~13
         20        ECHO                                                     ~14
   16    21        ECHO                                                     '%0A'
   17    22        INIT_FCALL                                               'strtotime'
         23        SEND_VAL                                                 'today'
         24        DO_ICALL                                         $15     
         25        ECHO                                                     $15
   18    26        ECHO                                                     '%0A'
   23    27        IS_SMALLER_OR_EQUAL                                      !4, !2
         28      > JMPZ                                                     ~16, ->31
   25    29    >   ECHO                                                     'Today'
         30      > JMP                                                      ->37
   27    31    >   SUB                                              ~17     !4, 86400
         32        IS_SMALLER_OR_EQUAL                                      ~17, !2
         33      > JMPZ                                                     ~18, ->36
   29    34    >   ECHO                                                     'Yesterday'
         35      > JMP                                                      ->37
   31    36    >   ECHO                                                     'AAAA'
   36    37    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.16 ms | 1396 KiB | 19 Q