3v4l.org

run code in 300+ PHP versions simultaneously
<?php $final = array(); $names = ['James', 'Mike', 'Liam', 'Shantel', 'Harry']; $colors = ['Green', 'Blue', 'Yellow', 'Purple', 'Red']; foreach($names as $i => $key) { $final[$key] = $colors[$i]; } var_dump($final);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 10
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 10
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
filename:       /in/cgHtD
function name:  (null)
number of ops:  15
compiled vars:  !0 = $final, !1 = $names, !2 = $colors, !3 = $key, !4 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, <array>
    5     2        ASSIGN                                                   !2, <array>
    8     3      > FE_RESET_R                                       $8      !1, ->10
          4    > > FE_FETCH_R                                       ~9      $8, !3, ->10
          5    >   ASSIGN                                                   !4, ~9
    9     6        FETCH_DIM_R                                      ~12     !2, !4
          7        ASSIGN_DIM                                               !0, !3
          8        OP_DATA                                                  ~12
    8     9      > JMP                                                      ->4
         10    >   FE_FREE                                                  $8
   12    11        INIT_FCALL                                               'var_dump'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.22 ms | 1394 KiB | 15 Q