3v4l.org

run code in 300+ PHP versions simultaneously
<?php $today = strtotime(date('2018-02-09')); $ym = strtotime(date('Y-m')); $day_count = date('t'); for ( $day = 1; $day <= $day_count; $day++) { $date = strtotime(date($ym.'-'.$day)); if ($today == $date) { echo "today \r\n"; echo $date. "\r\n"; echo $today. "\r\n"; } elseif ($today > $date) { echo "PAST \r\n"; echo $date. "\r\n"; echo $today. "\r\n"; } else { echo "FUTURE \r\n"; echo $date. "\r\n"; echo $today. "\r\n"; } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 51
Branch analysis from position: 51
2 jumps found. (Code = 44) Position 1 = 53, Position 2 = 20
Branch analysis from position: 53
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
2 jumps found. (Code = 43) Position 1 = 31, Position 2 = 37
Branch analysis from position: 31
1 jumps found. (Code = 42) Position 1 = 50
Branch analysis from position: 50
2 jumps found. (Code = 44) Position 1 = 53, Position 2 = 20
Branch analysis from position: 53
Branch analysis from position: 20
Branch analysis from position: 37
2 jumps found. (Code = 43) Position 1 = 39, Position 2 = 45
Branch analysis from position: 39
1 jumps found. (Code = 42) Position 1 = 50
Branch analysis from position: 50
Branch analysis from position: 45
2 jumps found. (Code = 44) Position 1 = 53, Position 2 = 20
Branch analysis from position: 53
Branch analysis from position: 20
filename:       /in/bfKUf
function name:  (null)
number of ops:  54
compiled vars:  !0 = $today, !1 = $ym, !2 = $day_count, !3 = $day, !4 = $date
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'strtotime'
          1        INIT_FCALL                                               'date'
          2        SEND_VAL                                                 '2018-02-09'
          3        DO_ICALL                                         $5      
          4        SEND_VAR                                                 $5
          5        DO_ICALL                                         $6      
          6        ASSIGN                                                   !0, $6
    4     7        INIT_FCALL                                               'strtotime'
          8        INIT_FCALL                                               'date'
          9        SEND_VAL                                                 'Y-m'
         10        DO_ICALL                                         $8      
         11        SEND_VAR                                                 $8
         12        DO_ICALL                                         $9      
         13        ASSIGN                                                   !1, $9
    5    14        INIT_FCALL                                               'date'
         15        SEND_VAL                                                 't'
         16        DO_ICALL                                         $11     
         17        ASSIGN                                                   !2, $11
    7    18        ASSIGN                                                   !3, 1
         19      > JMP                                                      ->51
    8    20    >   INIT_FCALL                                               'strtotime'
         21        INIT_FCALL                                               'date'
         22        CONCAT                                           ~14     !1, '-'
         23        CONCAT                                           ~15     ~14, !3
         24        SEND_VAL                                                 ~15
         25        DO_ICALL                                         $16     
         26        SEND_VAR                                                 $16
         27        DO_ICALL                                         $17     
         28        ASSIGN                                                   !4, $17
    9    29        IS_EQUAL                                                 !0, !4
         30      > JMPZ                                                     ~19, ->37
   10    31    >   ECHO                                                     'today+%0D%0A'
   11    32        CONCAT                                           ~20     !4, '%0D%0A'
         33        ECHO                                                     ~20
   12    34        CONCAT                                           ~21     !0, '%0D%0A'
         35        ECHO                                                     ~21
    9    36      > JMP                                                      ->50
   13    37    >   IS_SMALLER                                               !4, !0
         38      > JMPZ                                                     ~22, ->45
   14    39    >   ECHO                                                     'PAST+%0D%0A'
   15    40        CONCAT                                           ~23     !4, '%0D%0A'
         41        ECHO                                                     ~23
   16    42        CONCAT                                           ~24     !0, '%0D%0A'
         43        ECHO                                                     ~24
   13    44      > JMP                                                      ->50
   18    45    >   ECHO                                                     'FUTURE+%0D%0A'
   19    46        CONCAT                                           ~25     !4, '%0D%0A'
         47        ECHO                                                     ~25
   20    48        CONCAT                                           ~26     !0, '%0D%0A'
         49        ECHO                                                     ~26
    7    50    >   PRE_INC                                                  !3
         51    >   IS_SMALLER_OR_EQUAL                                      !3, !2
         52      > JMPNZ                                                    ~28, ->20
   22    53    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.2 ms | 1008 KiB | 15 Q