3v4l.org

run code in 300+ PHP versions simultaneously
<?php $how_many_years = 8; $min = 1; $max = 365; for($i = 1; $i <= $how_many_years; $i++ ) { print_r(array( array( 'id' => 'year-'.$i.'-min', 'default' => $min, // first day number of the year ), array( 'id' => 'year-'.$i.'-max', 'default' => $max, //last day number of the year )) ); $min = $max + 1; $max = $min + 365; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 5
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 5
Branch analysis from position: 25
Branch analysis from position: 5
filename:       /in/2U9vJ
function name:  (null)
number of ops:  26
compiled vars:  !0 = $how_many_years, !1 = $min, !2 = $max, !3 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 8
    4     1        ASSIGN                                                   !1, 1
    5     2        ASSIGN                                                   !2, 365
    7     3        ASSIGN                                                   !3, 1
          4      > JMP                                                      ->23
    8     5    >   INIT_FCALL                                               'print_r'
   10     6        CONCAT                                           ~8      'year-', !3
          7        CONCAT                                           ~9      ~8, '-min'
          8        INIT_ARRAY                                       ~10     ~9, 'id'
   11     9        ADD_ARRAY_ELEMENT                                ~10     !1, 'default'
         10        INIT_ARRAY                                       ~11     ~10
   15    11        CONCAT                                           ~12     'year-', !3
         12        CONCAT                                           ~13     ~12, '-max'
         13        INIT_ARRAY                                       ~14     ~13, 'id'
   16    14        ADD_ARRAY_ELEMENT                                ~14     !2, 'default'
         15        ADD_ARRAY_ELEMENT                                ~11     ~14
         16        SEND_VAL                                                 ~11
         17        DO_ICALL                                                 
   19    18        ADD                                              ~16     !2, 1
         19        ASSIGN                                                   !1, ~16
   20    20        ADD                                              ~18     !1, 365
         21        ASSIGN                                                   !2, ~18
    7    22        PRE_INC                                                  !3
         23    >   IS_SMALLER_OR_EQUAL                                      !3, !0
         24      > JMPNZ                                                    ~21, ->5
   21    25    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.18 ms | 1400 KiB | 15 Q