3v4l.org

run code in 300+ PHP versions simultaneously
<?php $startDate = "2014-06-01"; $endDate = "2014-06-30"; $endDate = strtotime($endDate); for($i = strtotime('Monday', strtotime($startDate)); $i <= $endDate; $i = strtotime('+1 week', $i)) echo date('l Y-m-d', $i).'<br>';
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
2 jumps found. (Code = 44) Position 1 = 28, Position 2 = 15
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 28, Position 2 = 15
Branch analysis from position: 28
Branch analysis from position: 15
filename:       /in/cDgds
function name:  (null)
number of ops:  29
compiled vars:  !0 = $startDate, !1 = $endDate, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '2014-06-01'
    3     1        ASSIGN                                                   !1, '2014-06-30'
    4     2        INIT_FCALL                                               'strtotime'
          3        SEND_VAR                                                 !1
          4        DO_ICALL                                         $5      
          5        ASSIGN                                                   !1, $5
    5     6        INIT_FCALL                                               'strtotime'
          7        SEND_VAL                                                 'Monday'
          8        INIT_FCALL                                               'strtotime'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                         $7      
         11        SEND_VAR                                                 $7
         12        DO_ICALL                                         $8      
         13        ASSIGN                                                   !2, $8
         14      > JMP                                                      ->26
    6    15    >   INIT_FCALL                                               'date'
         16        SEND_VAL                                                 'l+Y-m-d'
         17        SEND_VAR                                                 !2
         18        DO_ICALL                                         $10     
         19        CONCAT                                           ~11     $10, '%3Cbr%3E'
         20        ECHO                                                     ~11
    5    21        INIT_FCALL                                               'strtotime'
         22        SEND_VAL                                                 '%2B1+week'
         23        SEND_VAR                                                 !2
         24        DO_ICALL                                         $12     
         25        ASSIGN                                                   !2, $12
         26    >   IS_SMALLER_OR_EQUAL                                      !2, !1
         27      > JMPNZ                                                    ~14, ->15
    6    28    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157 ms | 1396 KiB | 17 Q