3v4l.org

run code in 300+ PHP versions simultaneously
<?php $da = array("friday","saturday"); $dates = array( "sunday" => 0, "monday" => 1, "tuesday" => 2, "wednesday" => 3, "thursday" => 4, "friday" => 5, "saturday" => 6 ); $a = ''; for ( $i =0; $i< sizeof($da); $i++){ if ( strtotime($da[$i]) >= strtotime("today") ){ $a = strtotime($da[$i]); if (isset($a)){ break; } } } print_r($a); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
2 jumps found. (Code = 44) Position 1 = 26, Position 2 = 5
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 22
Branch analysis from position: 14
2 jumps found. (Code = 43) Position 1 = 21, Position 2 = 22
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
Branch analysis from position: 22
2 jumps found. (Code = 44) Position 1 = 26, Position 2 = 5
Branch analysis from position: 26
Branch analysis from position: 5
Branch analysis from position: 22
filename:       /in/krEKR
function name:  (null)
number of ops:  30
compiled vars:  !0 = $da, !1 = $dates, !2 = $a, !3 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, <array>
   15     2        ASSIGN                                                   !2, ''
   16     3        ASSIGN                                                   !3, 0
          4      > JMP                                                      ->23
   17     5    >   INIT_FCALL                                               'strtotime'
          6        FETCH_DIM_R                                      ~8      !0, !3
          7        SEND_VAL                                                 ~8
          8        DO_ICALL                                         $9      
          9        INIT_FCALL                                               'strtotime'
         10        SEND_VAL                                                 'today'
         11        DO_ICALL                                         $10     
         12        IS_SMALLER_OR_EQUAL                                      $10, $9
         13      > JMPZ                                                     ~11, ->22
   18    14    >   INIT_FCALL                                               'strtotime'
         15        FETCH_DIM_R                                      ~12     !0, !3
         16        SEND_VAL                                                 ~12
         17        DO_ICALL                                         $13     
         18        ASSIGN                                                   !2, $13
   19    19        ISSET_ISEMPTY_CV                                         !2
         20      > JMPZ                                                     ~15, ->22
   20    21    > > JMP                                                      ->26
   16    22    >   PRE_INC                                                  !3
         23    >   COUNT                                            ~17     !0
         24        IS_SMALLER                                               !3, ~17
         25      > JMPNZ                                                    ~18, ->5
   25    26    >   INIT_FCALL                                               'print_r'
         27        SEND_VAR                                                 !2
         28        DO_ICALL                                                 
   26    29      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.68 ms | 1396 KiB | 17 Q