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++) { var_dump('x'); $nextYear = $currentYear+$i; $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/4KWUo
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'getavailablesubscriptionendyears'
          2        DO_FCALL                                      0  $0      
          3        SEND_VAR                                                 $0
          4        DO_ICALL                                                 
   17     5      > RETURN                                                   1

Function getavailablesubscriptionendyears:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 11
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 11
Branch analysis from position: 21
Branch analysis from position: 11
filename:       /in/4KWUo
function name:  getAvailableSubscriptionEndYears
number of ops:  23
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                                                      ->19
    8    11    >   INIT_FCALL                                               'var_dump'
         12        SEND_VAL                                                 'x'
         13        DO_ICALL                                                 
    9    14        ADD                                              ~12     !0, !2
         15        ASSIGN                                                   !3, ~12
   10    16        ASSIGN_DIM                                               !1, !3
         17        OP_DATA                                                  !3
    7    18        PRE_INC                                                  !2
         19    >   IS_SMALLER                                               !2, 10
         20      > JMPNZ                                                    ~16, ->11
   13    21    > > RETURN                                                   !1
   14    22*     > RETURN                                                   null

End of function getavailablesubscriptionendyears

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.26 ms | 1390 KiB | 18 Q