3v4l.org

run code in 300+ PHP versions simultaneously
<?php $da = array("sunday","thursday","saturday"); $a = ''; for ( $i =0; $i< sizeof($da); $i++){ if ( $da[0] == 'sunday' && sizeof($da) > 1 && (strtotime('today') != strtotime($da[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/eVW80
function name:  (null)
number of ops:  51
compiled vars:  !0 = $da, !1 = $a, !2 = $i
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                                      ~6      !0, 0
          5        IS_EQUAL                                         ~7      ~6, 'sunday'
          6      > JMPZ_EX                                          ~7      ~7, ->10
          7    >   COUNT                                            ~8      !0
          8        IS_SMALLER                                       ~9      1, ~8
          9        BOOL                                             ~7      ~9
         10    > > JMPZ_EX                                          ~7      ~7, ->20
         11    >   INIT_FCALL                                               'strtotime'
         12        SEND_VAL                                                 'today'
         13        DO_ICALL                                         $10     
         14        INIT_FCALL                                               'strtotime'
         15        FETCH_DIM_R                                      ~11     !0, 0
         16        SEND_VAL                                                 ~11
         17        DO_ICALL                                         $12     
         18        IS_NOT_EQUAL                                     ~13     $10, $12
         19        BOOL                                             ~7      ~13
         20    > > JMPZ                                                     ~7, ->22
    8    21    > > JMP                                                      ->39
   10    22    >   INIT_FCALL                                               'strtotime'
         23        FETCH_DIM_R                                      ~14     !0, !2
         24        SEND_VAL                                                 ~14
         25        DO_ICALL                                         $15     
         26        INIT_FCALL                                               'strtotime'
         27        SEND_VAL                                                 'today'
         28        DO_ICALL                                         $16     
         29        IS_SMALLER_OR_EQUAL                                      $16, $15
         30      > JMPZ                                                     ~17, ->39
   11    31    >   INIT_FCALL                                               'strtotime'
         32        FETCH_DIM_R                                      ~18     !0, !2
         33        SEND_VAL                                                 ~18
         34        DO_ICALL                                         $19     
         35        ASSIGN                                                   !1, $19
   12    36        ISSET_ISEMPTY_CV                                         !1
         37      > JMPZ                                                     ~21, ->39
   13    38    > > JMP                                                      ->43
    6    39    >   PRE_INC                                                  !2
         40    >   COUNT                                            ~23     !0
         41        IS_SMALLER                                               !2, ~23
         42      > JMPNZ                                                    ~24, ->4
   18    43    >   INIT_FCALL                                               'print_r'
         44        INIT_FCALL                                               'date'
         45        SEND_VAL                                                 'Y-m-d'
         46        SEND_VAR                                                 !1
         47        DO_ICALL                                         $25     
         48        SEND_VAR                                                 $25
         49        DO_ICALL                                                 
   19    50      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.26 ms | 1400 KiB | 19 Q