3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.35 ms | 1395 KiB | 19 Q