3v4l.org

run code in 300+ PHP versions simultaneously
<?php $activities= array("Date,Num_Days,Event,Location","3/3/2018,1,Rosary of the Unborn,In Front of Planned Parenthood","4/4/2018,2,Sell Raffle Tickets,St. Eugene Church"); $monthNames = array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"); $omonth = -1; $start = TRUE; print_r ($activities); print_r ($monthNames); print_r ($omonth); if ($start == True) {; print_r ("TRUE"); } $today = new DateTime("yesterday"); print_r ($today); $len_activities=sizeof($activities); for ($i = 1; $i < $len_activities; $i++) { $activity = $activities[$i]; print_r ($activity . "\n"); $activity = $activities[$i]; $activity_array = str_getcsv ($activity,",") ; print_r ($activity_array); $nd = new DateTime($activity_array[0]); print_r ($nd); $month = $nd->format("n")-1; print_r ("\n".$month."\n"); if ($today <= $nd) { print_r ("Future Date".$nd."\n"); } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 18
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 72
Branch analysis from position: 72
2 jumps found. (Code = 44) Position 1 = 74, Position 2 = 29
Branch analysis from position: 74
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 29
2 jumps found. (Code = 43) Position 1 = 66, Position 2 = 71
Branch analysis from position: 66
2 jumps found. (Code = 44) Position 1 = 74, Position 2 = 29
Branch analysis from position: 74
Branch analysis from position: 29
Branch analysis from position: 71
Branch analysis from position: 18
filename:       /in/iGVHH
function name:  (null)
number of ops:  75
compiled vars:  !0 = $activities, !1 = $monthNames, !2 = $omonth, !3 = $start, !4 = $today, !5 = $len_activities, !6 = $i, !7 = $activity, !8 = $activity_array, !9 = $nd, !10 = $month
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, <array>
    4     2        ASSIGN                                                   !2, -1
    5     3        ASSIGN                                                   !3, <true>
    6     4        INIT_FCALL                                               'print_r'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                                 
    7     7        INIT_FCALL                                               'print_r'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                                 
    8    10        INIT_FCALL                                               'print_r'
         11        SEND_VAR                                                 !2
         12        DO_ICALL                                                 
    9    13        BOOL                                             ~18     !3
         14      > JMPZ                                                     ~18, ->18
   10    15    >   INIT_FCALL                                               'print_r'
         16        SEND_VAL                                                 'TRUE'
         17        DO_ICALL                                                 
   12    18    >   NEW                                              $20     'DateTime'
         19        SEND_VAL_EX                                              'yesterday'
         20        DO_FCALL                                      0          
         21        ASSIGN                                                   !4, $20
   13    22        INIT_FCALL                                               'print_r'
         23        SEND_VAR                                                 !4
         24        DO_ICALL                                                 
   14    25        COUNT                                            ~24     !0
         26        ASSIGN                                                   !5, ~24
   15    27        ASSIGN                                                   !6, 1
         28      > JMP                                                      ->72
   16    29    >   FETCH_DIM_R                                      ~27     !0, !6
         30        ASSIGN                                                   !7, ~27
   17    31        INIT_FCALL                                               'print_r'
         32        CONCAT                                           ~29     !7, '%0A'
         33        SEND_VAL                                                 ~29
         34        DO_ICALL                                                 
   18    35        FETCH_DIM_R                                      ~31     !0, !6
         36        ASSIGN                                                   !7, ~31
   19    37        INIT_FCALL                                               'str_getcsv'
         38        SEND_VAR                                                 !7
         39        SEND_VAL                                                 '%2C'
         40        DO_ICALL                                         $33     
         41        ASSIGN                                                   !8, $33
   20    42        INIT_FCALL                                               'print_r'
         43        SEND_VAR                                                 !8
         44        DO_ICALL                                                 
   21    45        NEW                                              $36     'DateTime'
         46        CHECK_FUNC_ARG                                           
         47        FETCH_DIM_FUNC_ARG                               $37     !8, 0
         48        SEND_FUNC_ARG                                            $37
         49        DO_FCALL                                      0          
         50        ASSIGN                                                   !9, $36
   22    51        INIT_FCALL                                               'print_r'
         52        SEND_VAR                                                 !9
         53        DO_ICALL                                                 
   23    54        INIT_METHOD_CALL                                         !9, 'format'
         55        SEND_VAL_EX                                              'n'
         56        DO_FCALL                                      0  $41     
         57        SUB                                              ~42     $41, 1
         58        ASSIGN                                                   !10, ~42
   24    59        INIT_FCALL                                               'print_r'
         60        CONCAT                                           ~44     '%0A', !10
         61        CONCAT                                           ~45     ~44, '%0A'
         62        SEND_VAL                                                 ~45
         63        DO_ICALL                                                 
   25    64        IS_SMALLER_OR_EQUAL                                      !4, !9
         65      > JMPZ                                                     ~47, ->71
   26    66    >   INIT_FCALL                                               'print_r'
         67        CONCAT                                           ~48     'Future+Date', !9
         68        CONCAT                                           ~49     ~48, '%0A'
         69        SEND_VAL                                                 ~49
         70        DO_ICALL                                                 
   15    71    >   PRE_INC                                                  !6
         72    >   IS_SMALLER                                               !6, !5
         73      > JMPNZ                                                    ~52, ->29
   28    74    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.39 ms | 1405 KiB | 17 Q