3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.07 ms | 1395 KiB | 15 Q