3v4l.org

run code in 300+ PHP versions simultaneously
<?php $weeks = 4; $date = ""; for($weekNo = 0; $weekNo < $weeks; $weekNo++) { $thursday = strtotime("next Thursday " . $date); $date = date('d-m-Y', $thursday); echo $date . "\n"; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 4
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 4
Branch analysis from position: 19
Branch analysis from position: 4
filename:       /in/kQKm6
function name:  (null)
number of ops:  20
compiled vars:  !0 = $weeks, !1 = $date, !2 = $weekNo, !3 = $thursday
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 4
    4     1        ASSIGN                                                   !1, ''
    5     2        ASSIGN                                                   !2, 0
          3      > JMP                                                      ->17
    6     4    >   INIT_FCALL                                               'strtotime'
          5        CONCAT                                           ~7      'next+Thursday+', !1
          6        SEND_VAL                                                 ~7
          7        DO_ICALL                                         $8      
          8        ASSIGN                                                   !3, $8
    7     9        INIT_FCALL                                               'date'
         10        SEND_VAL                                                 'd-m-Y'
         11        SEND_VAR                                                 !3
         12        DO_ICALL                                         $10     
         13        ASSIGN                                                   !1, $10
    8    14        CONCAT                                           ~12     !1, '%0A'
         15        ECHO                                                     ~12
    5    16        PRE_INC                                                  !2
         17    >   IS_SMALLER                                               !2, !0
         18      > JMPNZ                                                    ~14, ->4
    9    19    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.37 ms | 1005 KiB | 15 Q