3v4l.org

run code in 300+ PHP versions simultaneously
<?php $start = new DateTime('2013-05-01'); $end = new DateTime('2013-08-30'); $interval = DateInterval::createFromDateString('1 day'); $period = new DatePeriod($start, $interval, $end); foreach ($period as $dt) { if ($dt->format("N") == 2 || $dt->format("N") == 4) { echo $dt->format("l Y-m-d") . "<br>\n"; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 19, Position 2 = 37
Branch analysis from position: 19
2 jumps found. (Code = 78) Position 1 = 20, Position 2 = 37
Branch analysis from position: 20
2 jumps found. (Code = 47) Position 1 = 25, Position 2 = 30
Branch analysis from position: 25
2 jumps found. (Code = 43) Position 1 = 31, Position 2 = 36
Branch analysis from position: 31
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
Branch analysis from position: 36
Branch analysis from position: 30
Branch analysis from position: 37
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 37
filename:       /in/LMnvk
function name:  (null)
number of ops:  39
compiled vars:  !0 = $start, !1 = $end, !2 = $interval, !3 = $period, !4 = $dt
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $5      'DateTime'
          1        SEND_VAL_EX                                              '2013-05-01'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $5
    3     4        NEW                                              $8      'DateTime'
          5        SEND_VAL_EX                                              '2013-08-30'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $8
    4     8        INIT_STATIC_METHOD_CALL                                  'DateInterval', 'createFromDateString'
          9        SEND_VAL                                                 '1+day'
         10        DO_FCALL                                      0  $11     
         11        ASSIGN                                                   !2, $11
    5    12        NEW                                              $13     'DatePeriod'
         13        SEND_VAR_EX                                              !0
         14        SEND_VAR_EX                                              !2
         15        SEND_VAR_EX                                              !1
         16        DO_FCALL                                      0          
         17        ASSIGN                                                   !3, $13
    7    18      > FE_RESET_R                                       $16     !3, ->37
         19    > > FE_FETCH_R                                               $16, !4, ->37
    8    20    >   INIT_METHOD_CALL                                         !4, 'format'
         21        SEND_VAL_EX                                              'N'
         22        DO_FCALL                                      0  $17     
         23        IS_EQUAL                                         ~18     $17, 2
         24      > JMPNZ_EX                                         ~18     ~18, ->30
         25    >   INIT_METHOD_CALL                                         !4, 'format'
         26        SEND_VAL_EX                                              'N'
         27        DO_FCALL                                      0  $19     
         28        IS_EQUAL                                         ~20     $19, 4
         29        BOOL                                             ~18     ~20
         30    > > JMPZ                                                     ~18, ->36
    9    31    >   INIT_METHOD_CALL                                         !4, 'format'
         32        SEND_VAL_EX                                              'l+Y-m-d'
         33        DO_FCALL                                      0  $21     
         34        CONCAT                                           ~22     $21, '%3Cbr%3E%0A'
         35        ECHO                                                     ~22
    7    36    > > JMP                                                      ->19
         37    >   FE_FREE                                                  $16
   11    38      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.59 ms | 1072 KiB | 13 Q