3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getAvailableSubscriptionEndYears() { $currentYear = intval(date_create()->format('Y')); $availableYears = array($currentYear => $currentYear); for($i=1;$i<10;$i++) { $nextYear = $currentYear+1; $availableYears[$nextYear] = $nextYear; } return $availableYears; } var_dump(getAvailableSubscriptionEndYears()); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ClB0H
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'getavailablesubscriptionendyears'
          2        DO_FCALL                                      0  $0      
          3        SEND_VAR                                                 $0
          4        DO_ICALL                                                 
   16     5      > RETURN                                                   1

Function getavailablesubscriptionendyears:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 11
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 11
Branch analysis from position: 18
Branch analysis from position: 11
filename:       /in/ClB0H
function name:  getAvailableSubscriptionEndYears
number of ops:  20
compiled vars:  !0 = $currentYear, !1 = $availableYears, !2 = $i, !3 = $nextYear
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL                                               'date_create'
          1        DO_ICALL                                         $4      
          2        INIT_METHOD_CALL                                         $4, 'format'
          3        SEND_VAL_EX                                              'Y'
          4        DO_FCALL                                      0  $5      
          5        CAST                                          4  ~6      $5
          6        ASSIGN                                                   !0, ~6
    6     7        INIT_ARRAY                                       ~8      !0, !0
          8        ASSIGN                                                   !1, ~8
    7     9        ASSIGN                                                   !2, 1
         10      > JMP                                                      ->16
    8    11    >   ADD                                              ~11     !0, 1
         12        ASSIGN                                                   !3, ~11
    9    13        ASSIGN_DIM                                               !1, !3
         14        OP_DATA                                                  !3
    7    15        PRE_INC                                                  !2
         16    >   IS_SMALLER                                               !2, 10
         17      > JMPNZ                                                    ~15, ->11
   12    18    > > RETURN                                                   !1
   13    19*     > RETURN                                                   null

End of function getavailablesubscriptionendyears

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
223.85 ms | 1399 KiB | 18 Q