3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo $phpdate = strtotime('-1 day'); echo PHP_EOL; echo $mysqldate = date('Y-m-d H:i:s', $phpdate); echo PHP_EOL; $last_access = $phpdate; $now = time(); $last_midnight = $now - ($now % (24*60*60)); if ($last_access >= $last_midnight) { print "Today"; } elseif ($last_access >= ($last_midnight-(24*60*60))) { print "Yesterday"; } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 24
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
2 jumps found. (Code = 43) Position 1 = 27, Position 2 = 28
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 28
filename:       /in/RQdgc
function name:  (null)
number of ops:  29
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                                                 '-1+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                                                   !4, ~13
   17    20        IS_SMALLER_OR_EQUAL                                      !4, !2
         21      > JMPZ                                                     ~15, ->24
   19    22    >   ECHO                                                     'Today'
         23      > JMP                                                      ->28
   21    24    >   SUB                                              ~16     !4, 86400
         25        IS_SMALLER_OR_EQUAL                                      ~16, !2
         26      > JMPZ                                                     ~17, ->28
   23    27    >   ECHO                                                     'Yesterday'
   30    28    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.74 ms | 1396 KiB | 19 Q