3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array(Array ( 0 => "ISP2", 1 => "ISP3", 2 => "ISP4" ), Array ( 0 => "NAME-A", 1 => "NAME-B", 2 => "NAME-C" ), Array ( 0 => "property1", 1 => "property2", 2 => "property2" )); $result = array(); Foreach($arr[2] as $key => $prop){ $result[$prop]["charges"][] =$arr[0][$key]; $result[$prop]["names"][] = $arr[1][$key]; } Var_dump($result);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 19
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 19
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/EilvE
function name:  (null)
number of ops:  24
compiled vars:  !0 = $arr, !1 = $result, !2 = $prop, !3 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   22     1        ASSIGN                                                   !1, <array>
   23     2        FETCH_DIM_R                                      ~6      !0, 2
          3      > FE_RESET_R                                       $7      ~6, ->19
          4    > > FE_FETCH_R                                       ~8      $7, !2, ->19
          5    >   ASSIGN                                                   !3, ~8
   24     6        FETCH_DIM_R                                      ~13     !0, 0
          7        FETCH_DIM_R                                      ~14     ~13, !3
          8        FETCH_DIM_W                                      $10     !1, !2
          9        FETCH_DIM_W                                      $11     $10, 'charges'
         10        ASSIGN_DIM                                               $11
         11        OP_DATA                                                  ~14
   25    12        FETCH_DIM_R                                      ~18     !0, 1
         13        FETCH_DIM_R                                      ~19     ~18, !3
         14        FETCH_DIM_W                                      $15     !1, !2
         15        FETCH_DIM_W                                      $16     $15, 'names'
         16        ASSIGN_DIM                                               $16
         17        OP_DATA                                                  ~19
   23    18      > JMP                                                      ->4
         19    >   FE_FREE                                                  $7
   28    20        INIT_FCALL                                               'var_dump'
         21        SEND_VAR                                                 !1
         22        DO_ICALL                                                 
         23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.07 ms | 1010 KiB | 14 Q