3v4l.org

run code in 300+ PHP versions simultaneously
<?php $weeks = 4; $date = ""; if ((date("l") == "Thursday") && (date('H') > 20)) { $date = date('d-m-Y', strtotime("next Thursday")); } 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
2 jumps found. (Code = 46) Position 1 = 7, Position 2 = 12
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 21
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 36
Branch analysis from position: 36
2 jumps found. (Code = 44) Position 1 = 38, Position 2 = 23
Branch analysis from position: 38
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
2 jumps found. (Code = 44) Position 1 = 38, Position 2 = 23
Branch analysis from position: 38
Branch analysis from position: 23
Branch analysis from position: 21
Branch analysis from position: 12
filename:       /in/tfBU1
function name:  (null)
number of ops:  39
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        INIT_FCALL                                               'date'
          3        SEND_VAL                                                 'l'
          4        DO_ICALL                                         $6      
          5        IS_EQUAL                                         ~7      $6, 'Thursday'
          6      > JMPZ_EX                                          ~7      ~7, ->12
          7    >   INIT_FCALL                                               'date'
          8        SEND_VAL                                                 'H'
          9        DO_ICALL                                         $8      
         10        IS_SMALLER                                       ~9      20, $8
         11        BOOL                                             ~7      ~9
         12    > > JMPZ                                                     ~7, ->21
    6    13    >   INIT_FCALL                                               'date'
         14        SEND_VAL                                                 'd-m-Y'
         15        INIT_FCALL                                               'strtotime'
         16        SEND_VAL                                                 'next+Thursday'
         17        DO_ICALL                                         $10     
         18        SEND_VAR                                                 $10
         19        DO_ICALL                                         $11     
         20        ASSIGN                                                   !1, $11
    8    21    >   ASSIGN                                                   !2, 0
         22      > JMP                                                      ->36
    9    23    >   INIT_FCALL                                               'strtotime'
         24        CONCAT                                           ~14     'next+Thursday+', !1
         25        SEND_VAL                                                 ~14
         26        DO_ICALL                                         $15     
         27        ASSIGN                                                   !3, $15
   10    28        INIT_FCALL                                               'date'
         29        SEND_VAL                                                 'd-m-Y'
         30        SEND_VAR                                                 !3
         31        DO_ICALL                                         $17     
         32        ASSIGN                                                   !1, $17
   11    33        CONCAT                                           ~19     !1, '%0A'
         34        ECHO                                                     ~19
    8    35        PRE_INC                                                  !2
         36    >   IS_SMALLER                                               !2, !0
         37      > JMPNZ                                                    ~21, ->23
   12    38    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.21 ms | 1011 KiB | 15 Q