3v4l.org

run code in 500+ PHP versions simultaneously
<?php $year = "2017"; $month = "10"; $day = "01"; $first_date = $year."-".$month."-".$day; $last_date = date("Y-m-t",strtotime($first_date)); $first_week = date("W",strtotime($first_date)); $last_week = date("W",strtotime($last_date)); for($i=$first_week;$i<=$last_week;$i++) { echo "Week #".$i.", "; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 38
Branch analysis from position: 38
2 jumps found. (Code = 44) Position 1 = 40, Position 2 = 34
Branch analysis from position: 40
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 34
2 jumps found. (Code = 44) Position 1 = 40, Position 2 = 34
Branch analysis from position: 40
Branch analysis from position: 34
filename:       /in/YviJo
function name:  (null)
number of ops:  41
compiled vars:  !0 = $year, !1 = $month, !2 = $day, !3 = $first_date, !4 = $last_date, !5 = $first_week, !6 = $last_week, !7 = $i
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, '2017'
    4     1        ASSIGN                                                       !1, '10'
    5     2        ASSIGN                                                       !2, '01'
    6     3        CONCAT                                               ~11     !0, '-'
          4        CONCAT                                               ~12     ~11, !1
          5        CONCAT                                               ~13     ~12, '-'
          6        CONCAT                                               ~14     ~13, !2
          7        ASSIGN                                                       !3, ~14
    7     8        INIT_FCALL                                                   'date'
          9        SEND_VAL                                                     'Y-m-t'
         10        INIT_FCALL                                                   'strtotime'
         11        SEND_VAR                                                     !3
         12        DO_ICALL                                             $16     
         13        SEND_VAR                                                     $16
         14        DO_ICALL                                             $17     
         15        ASSIGN                                                       !4, $17
    8    16        INIT_FCALL                                                   'date'
         17        SEND_VAL                                                     'W'
         18        INIT_FCALL                                                   'strtotime'
         19        SEND_VAR                                                     !3
         20        DO_ICALL                                             $19     
         21        SEND_VAR                                                     $19
         22        DO_ICALL                                             $20     
         23        ASSIGN                                                       !5, $20
    9    24        INIT_FCALL                                                   'date'
         25        SEND_VAL                                                     'W'
         26        INIT_FCALL                                                   'strtotime'
         27        SEND_VAR                                                     !4
         28        DO_ICALL                                             $22     
         29        SEND_VAR                                                     $22
         30        DO_ICALL                                             $23     
         31        ASSIGN                                                       !6, $23
   10    32        ASSIGN                                                       !7, !5
         33      > JMP                                                          ->38
   12    34    >   CONCAT                                               ~26     'Week+%23', !7
         35        CONCAT                                               ~27     ~26, '%2C+'
         36        ECHO                                                         ~27
   10    37        PRE_INC                                                      !7
         38    >   IS_SMALLER_OR_EQUAL                                          !7, !6
         39      > JMPNZ                                                        ~29, ->34
   13    40    > > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
162.85 ms | 2591 KiB | 15 Q