3v4l.org

run code in 300+ PHP versions simultaneously
<?php $da = array("sunday","thursday","saturday"); $a = ''; for ( $i =0; $i< sizeof($da); $i++){ if ( $days[0] == 'sunday' && sizeof($da) > 1 && (strtotime('today') != strtotime($days[0])) ){ continue; } if ( strtotime($da[$i]) >= strtotime("today") ){ $a = strtotime($da[$i]); if (isset($a)){ break; } } } print_r(date('Y-m-d',$a)); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 40
Branch analysis from position: 40
2 jumps found. (Code = 44) Position 1 = 43, Position 2 = 4
Branch analysis from position: 43
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 46) Position 1 = 7, Position 2 = 10
Branch analysis from position: 7
2 jumps found. (Code = 46) Position 1 = 11, Position 2 = 20
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 21, Position 2 = 22
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 39
Branch analysis from position: 39
2 jumps found. (Code = 44) Position 1 = 43, Position 2 = 4
Branch analysis from position: 43
Branch analysis from position: 4
Branch analysis from position: 22
2 jumps found. (Code = 43) Position 1 = 31, Position 2 = 39
Branch analysis from position: 31
2 jumps found. (Code = 43) Position 1 = 38, Position 2 = 39
Branch analysis from position: 38
1 jumps found. (Code = 42) Position 1 = 43
Branch analysis from position: 43
Branch analysis from position: 39
Branch analysis from position: 39
Branch analysis from position: 20
Branch analysis from position: 10
filename:       /in/igah4
function name:  (null)
number of ops:  51
compiled vars:  !0 = $da, !1 = $a, !2 = $i, !3 = $days
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        ASSIGN                                                   !1, ''
    6     2        ASSIGN                                                   !2, 0
          3      > JMP                                                      ->40
    7     4    >   FETCH_DIM_R                                      ~7      !3, 0
          5        IS_EQUAL                                         ~8      ~7, 'sunday'
          6      > JMPZ_EX                                          ~8      ~8, ->10
          7    >   COUNT                                            ~9      !0
          8        IS_SMALLER                                       ~10     1, ~9
          9        BOOL                                             ~8      ~10
         10    > > JMPZ_EX                                          ~8      ~8, ->20
         11    >   INIT_FCALL                                               'strtotime'
         12        SEND_VAL                                                 'today'
         13        DO_ICALL                                         $11     
         14        INIT_FCALL                                               'strtotime'
         15        FETCH_DIM_R                                      ~12     !3, 0
         16        SEND_VAL                                                 ~12
         17        DO_ICALL                                         $13     
         18        IS_NOT_EQUAL                                     ~14     $11, $13
         19        BOOL                                             ~8      ~14
         20    > > JMPZ                                                     ~8, ->22
    8    21    > > JMP                                                      ->39
   10    22    >   INIT_FCALL                                               'strtotime'
         23        FETCH_DIM_R                                      ~15     !0, !2
         24        SEND_VAL                                                 ~15
         25        DO_ICALL                                         $16     
         26        INIT_FCALL                                               'strtotime'
         27        SEND_VAL                                                 'today'
         28        DO_ICALL                                         $17     
         29        IS_SMALLER_OR_EQUAL                                      $17, $16
         30      > JMPZ                                                     ~18, ->39
   11    31    >   INIT_FCALL                                               'strtotime'
         32        FETCH_DIM_R                                      ~19     !0, !2
         33        SEND_VAL                                                 ~19
         34        DO_ICALL                                         $20     
         35        ASSIGN                                                   !1, $20
   12    36        ISSET_ISEMPTY_CV                                         !1
         37      > JMPZ                                                     ~22, ->39
   13    38    > > JMP                                                      ->43
    6    39    >   PRE_INC                                                  !2
         40    >   COUNT                                            ~24     !0
         41        IS_SMALLER                                               !2, ~24
         42      > JMPNZ                                                    ~25, ->4
   18    43    >   INIT_FCALL                                               'print_r'
         44        INIT_FCALL                                               'date'
         45        SEND_VAL                                                 'Y-m-d'
         46        SEND_VAR                                                 !1
         47        DO_ICALL                                         $26     
         48        SEND_VAR                                                 $26
         49        DO_ICALL                                                 
   19    50      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.55 ms | 1400 KiB | 19 Q