3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
160.04 ms | 1993 KiB | 14 Q