3v4l.org

run code in 300+ PHP versions simultaneously
<?php $time = strtotime("first Monday of ".$monthname." ".$year); while($time <= strtotime("last Monday of ".$monthname." ".$year)) { echo date('jS',$time)." ".$monthname; $time += (7*24*60*60); //Advance One Week. } ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 24, Position 2 = 8
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 24, Position 2 = 8
Branch analysis from position: 24
Branch analysis from position: 8
filename:       /in/TiNlu
function name:  (null)
number of ops:  25
compiled vars:  !0 = $time, !1 = $monthname, !2 = $year
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'strtotime'
          1        CONCAT                                           ~3      'first+Monday+of+', !1
          2        CONCAT                                           ~4      ~3, '+'
          3        CONCAT                                           ~5      ~4, !2
          4        SEND_VAL                                                 ~5
          5        DO_ICALL                                         $6      
          6        ASSIGN                                                   !0, $6
    3     7      > JMP                                                      ->16
    4     8    >   INIT_FCALL                                               'date'
          9        SEND_VAL                                                 'jS'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $8      
         12        CONCAT                                           ~9      $8, '+'
         13        CONCAT                                           ~10     ~9, !1
         14        ECHO                                                     ~10
    5    15        ASSIGN_OP                                     1          !0, 604800
    3    16    >   INIT_FCALL                                               'strtotime'
         17        CONCAT                                           ~12     'last+Monday+of+', !1
         18        CONCAT                                           ~13     ~12, '+'
         19        CONCAT                                           ~14     ~13, !2
         20        SEND_VAL                                                 ~14
         21        DO_ICALL                                         $15     
         22        IS_SMALLER_OR_EQUAL                                      !0, $15
         23      > JMPNZ                                                    ~16, ->8
    7    24    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.52 ms | 1395 KiB | 17 Q