3v4l.org

run code in 300+ PHP versions simultaneously
<?php $startTime = strtotime('2013-01-01 3:00'); $finishTime = strtotime('2013-03-01 3:00'); $lastMonthDay = strtotime(sprintf('last day of Jan'), $startTime); $dateTime = strtotime(sprintf('%s %s %s', 'Mon', $startHM, $month), $startTime); for (;$dateTime <= $lastMonthDay, $dateTime <= $finishTime; $dateTime = strtotime('+1 week', $dateTime)) { echo date ('d-m-Y H:i'); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 37
Branch analysis from position: 37
2 jumps found. (Code = 44) Position 1 = 41, Position 2 = 28
Branch analysis from position: 41
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 28
2 jumps found. (Code = 44) Position 1 = 41, Position 2 = 28
Branch analysis from position: 41
Branch analysis from position: 28
filename:       /in/FHqIK
function name:  (null)
number of ops:  42
compiled vars:  !0 = $startTime, !1 = $finishTime, !2 = $lastMonthDay, !3 = $dateTime, !4 = $startHM, !5 = $month
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'strtotime'
          1        SEND_VAL                                                 '2013-01-01+3%3A00'
          2        DO_ICALL                                         $6      
          3        ASSIGN                                                   !0, $6
    3     4        INIT_FCALL                                               'strtotime'
          5        SEND_VAL                                                 '2013-03-01+3%3A00'
          6        DO_ICALL                                         $8      
          7        ASSIGN                                                   !1, $8
    4     8        INIT_FCALL                                               'strtotime'
          9        INIT_FCALL                                               'sprintf'
         10        SEND_VAL                                                 'last+day+of+Jan'
         11        DO_ICALL                                         $10     
         12        SEND_VAR                                                 $10
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                         $11     
         15        ASSIGN                                                   !2, $11
    5    16        INIT_FCALL                                               'strtotime'
         17        INIT_FCALL                                               'sprintf'
         18        SEND_VAL                                                 '%25s+%25s+%25s'
         19        SEND_VAL                                                 'Mon'
         20        SEND_VAR                                                 !4
         21        SEND_VAR                                                 !5
         22        DO_ICALL                                         $13     
         23        SEND_VAR                                                 $13
         24        SEND_VAR                                                 !0
         25        DO_ICALL                                         $14     
         26        ASSIGN                                                   !3, $14
    6    27      > JMP                                                      ->37
    7    28    >   INIT_FCALL                                               'date'
         29        SEND_VAL                                                 'd-m-Y+H%3Ai'
         30        DO_ICALL                                         $16     
         31        ECHO                                                     $16
    6    32        INIT_FCALL                                               'strtotime'
         33        SEND_VAL                                                 '%2B1+week'
         34        SEND_VAR                                                 !3
         35        DO_ICALL                                         $17     
         36        ASSIGN                                                   !3, $17
         37    >   IS_SMALLER_OR_EQUAL                              ~19     !3, !2
         38        FREE                                                     ~19
         39        IS_SMALLER_OR_EQUAL                                      !3, !1
         40      > JMPNZ                                                    ~20, ->28
    8    41    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.79 ms | 1400 KiB | 19 Q