3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = array(1,2,3,4,5); $output = array(); //Put your code here for ($i = 0; $i < count($input) + 1; $i++) { echo $i; $output[$i] = $input[$i] * 2; } var_dump($output); /*Output: array(5) { [0]=> int(2) [1]=> int(4) [2]=> int(6) [3]=> int(8) [4]=> int(10) } */
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 4
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 4
Branch analysis from position: 14
Branch analysis from position: 4
filename:       /in/voAGI
function name:  (null)
number of ops:  18
compiled vars:  !0 = $input, !1 = $output, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, <array>
    6     2        ASSIGN                                                   !2, 0
          3      > JMP                                                      ->10
    7     4    >   ECHO                                                     !2
    8     5        FETCH_DIM_R                                      ~7      !0, !2
          6        MUL                                              ~8      ~7, 2
          7        ASSIGN_DIM                                               !1, !2
          8        OP_DATA                                                  ~8
    6     9        PRE_INC                                                  !2
         10    >   COUNT                                            ~10     !0
         11        ADD                                              ~11     ~10, 1
         12        IS_SMALLER                                               !2, ~11
         13      > JMPNZ                                                    ~12, ->4
   10    14    >   INIT_FCALL                                               'var_dump'
         15        SEND_VAR                                                 !1
         16        DO_ICALL                                                 
   13    17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.36 ms | 1395 KiB | 15 Q