3v4l.org

run code in 300+ PHP versions simultaneously
<?php $start = "2015-09-01"; $end = date('Y-m-d', strtotime("$start +1 months")); $period = floor((strtotime($end) - strtotime($start))/(24*60*60)); for($i = 0; $i < $period; $i++){ if(in_array(date('l',strtotime("$start +$i day")),["Monday","Friday"])) echo date('l d M, Y',strtotime("$start +$i day"))."\n"; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 52
Branch analysis from position: 52
2 jumps found. (Code = 44) Position 1 = 54, Position 2 = 25
Branch analysis from position: 54
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
2 jumps found. (Code = 43) Position 1 = 38, Position 2 = 51
Branch analysis from position: 38
2 jumps found. (Code = 44) Position 1 = 54, Position 2 = 25
Branch analysis from position: 54
Branch analysis from position: 25
Branch analysis from position: 51
filename:       /in/L2UMW
function name:  (null)
number of ops:  55
compiled vars:  !0 = $start, !1 = $end, !2 = $period, !3 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '2015-09-01'
    4     1        INIT_FCALL                                               'date'
          2        SEND_VAL                                                 'Y-m-d'
          3        INIT_FCALL                                               'strtotime'
          4        NOP                                                      
          5        FAST_CONCAT                                      ~5      !0, '+%2B1+months'
          6        SEND_VAL                                                 ~5
          7        DO_ICALL                                         $6      
          8        SEND_VAR                                                 $6
          9        DO_ICALL                                         $7      
         10        ASSIGN                                                   !1, $7
    5    11        INIT_FCALL                                               'floor'
         12        INIT_FCALL                                               'strtotime'
         13        SEND_VAR                                                 !1
         14        DO_ICALL                                         $9      
         15        INIT_FCALL                                               'strtotime'
         16        SEND_VAR                                                 !0
         17        DO_ICALL                                         $10     
         18        SUB                                              ~11     $9, $10
         19        DIV                                              ~12     ~11, 86400
         20        SEND_VAL                                                 ~12
         21        DO_ICALL                                         $13     
         22        ASSIGN                                                   !2, $13
    7    23        ASSIGN                                                   !3, 0
         24      > JMP                                                      ->52
    8    25    >   INIT_FCALL                                               'date'
         26        SEND_VAL                                                 'l'
         27        INIT_FCALL                                               'strtotime'
         28        ROPE_INIT                                     4  ~17     !0
         29        ROPE_ADD                                      1  ~17     ~17, '+%2B'
         30        ROPE_ADD                                      2  ~17     ~17, !3
         31        ROPE_END                                      3  ~16     ~17, '+day'
         32        SEND_VAL                                                 ~16
         33        DO_ICALL                                         $19     
         34        SEND_VAR                                                 $19
         35        DO_ICALL                                         $20     
         36        IN_ARRAY                                                 $20, <array>
         37      > JMPZ                                                     ~21, ->51
    9    38    >   INIT_FCALL                                               'date'
         39        SEND_VAL                                                 'l+d+M%2C+Y'
         40        INIT_FCALL                                               'strtotime'
         41        ROPE_INIT                                     4  ~23     !0
         42        ROPE_ADD                                      1  ~23     ~23, '+%2B'
         43        ROPE_ADD                                      2  ~23     ~23, !3
         44        ROPE_END                                      3  ~22     ~23, '+day'
         45        SEND_VAL                                                 ~22
         46        DO_ICALL                                         $25     
         47        SEND_VAR                                                 $25
         48        DO_ICALL                                         $26     
         49        CONCAT                                           ~27     $26, '%0A'
         50        ECHO                                                     ~27
    7    51    >   PRE_INC                                                  !3
         52    >   IS_SMALLER                                               !3, !2
         53      > JMPNZ                                                    ~29, ->25
   10    54    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.63 ms | 1405 KiB | 19 Q