3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * Increments letter * @param int $number * @param array &$arr */ function increment($number, &$arr) { $char = end($arr); $char++; for ($i = 0; $i < $number; $i++, $char++) { $arr[] = $char; } } $arr = range('A', 'D'); $number = 30; increment($number, $arr); var_dump($arr);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IGhoL
function name:  (null)
number of ops:  14
compiled vars:  !0 = $arr, !1 = $number
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   INIT_FCALL                                               'range'
          1        SEND_VAL                                                 'A'
          2        SEND_VAL                                                 'D'
          3        DO_ICALL                                         $2      
          4        ASSIGN                                                   !0, $2
   17     5        ASSIGN                                                   !1, 30
   19     6        INIT_FCALL                                               'increment'
          7        SEND_VAR                                                 !1
          8        SEND_REF                                                 !0
          9        DO_FCALL                                      0          
   20    10        INIT_FCALL                                               'var_dump'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                                 
         13      > RETURN                                                   1

Function increment:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 9
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 9
Branch analysis from position: 15
Branch analysis from position: 9
filename:       /in/IGhoL
function name:  increment
number of ops:  16
compiled vars:  !0 = $number, !1 = $arr, !2 = $char, !3 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    9     2        INIT_FCALL                                               'end'
          3        SEND_REF                                                 !1
          4        DO_ICALL                                         $4      
          5        ASSIGN                                                   !2, $4
   10     6        PRE_INC                                                  !2
   11     7        ASSIGN                                                   !3, 0
          8      > JMP                                                      ->13
   12     9    >   ASSIGN_DIM                                               !1
         10        OP_DATA                                                  !2
   11    11        PRE_INC                                                  !3
         12        PRE_INC                                                  !2
         13    >   IS_SMALLER                                               !3, !0
         14      > JMPNZ                                                    ~11, ->9
   14    15    > > RETURN                                                   null

End of function increment

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.79 ms | 1016 KiB | 17 Q