3v4l.org

run code in 500+ PHP versions simultaneously
<?php $cur_year = date('Y'); $url = 'url_here'; for ($i=2020; $i<=$cur_year; $i++) echo '<a href="'.$url.'/'.$i.'" class="btn btn-default '.(($cur_year == $i)?'active':'').'">'.$i.'</a>';
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
2 jumps found. (Code = 44) Position 1 = 24, Position 2 = 7
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 15
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 24, Position 2 = 7
Branch analysis from position: 24
Branch analysis from position: 7
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 24, Position 2 = 7
Branch analysis from position: 24
Branch analysis from position: 7
filename:       /in/PRiVt
function name:  (null)
number of ops:  25
compiled vars:  !0 = $cur_year, !1 = $url, !2 = $i
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                                   'date'
          1        SEND_VAL                                                     'Y'
          2        DO_ICALL                                             $3      
          3        ASSIGN                                                       !0, $3
    5     4        ASSIGN                                                       !1, 'url_here'
    6     5        ASSIGN                                                       !2, 2020
          6      > JMP                                                          ->22
          7    >   CONCAT                                               ~7      '%3Ca+href%3D%22', !1
          8        CONCAT                                               ~8      ~7, '%2F'
          9        CONCAT                                               ~9      ~8, !2
         10        CONCAT                                               ~10     ~9, '%22+class%3D%22btn+btn-default+'
         11        IS_EQUAL                                                     !0, !2
         12      > JMPZ                                                         ~11, ->15
         13    >   QM_ASSIGN                                            ~12     'active'
         14      > JMP                                                          ->16
         15    >   QM_ASSIGN                                            ~12     ''
         16    >   CONCAT                                               ~13     ~10, ~12
         17        CONCAT                                               ~14     ~13, '%22%3E'
         18        CONCAT                                               ~15     ~14, !2
         19        CONCAT                                               ~16     ~15, '%3C%2Fa%3E'
         20        ECHO                                                         ~16
         21        PRE_INC                                                      !2
         22    >   IS_SMALLER_OR_EQUAL                                          !2, !0
         23      > JMPNZ                                                        ~18, ->7
         24    > > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
158.17 ms | 1988 KiB | 14 Q