3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json = array( '123' => array('data' => array('categories' => array( array( 'id' => '2', 'description' => 'Single-player' ), array( 'id' => '1', 'description' => 'Multi-player' ), array( 'id' => '9', 'description' => 'Co-op' ), array( 'id' => '22', 'description' => 'Steam Achievements' ), array( 'id' => '28', 'description' => 'Full controller support' ) )) ), '456' => array('data' => array('categories' => array( array( 'id' => '21', 'description' => 'Downloadable Content' ) )) ), ); //print_r($json); $merged = array(); foreach($json as $j1) { foreach($j1 as $j2) { foreach($j2 as $key => $j3) { $merged[$key][] = $j3; } } } print_r($merged);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 17
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 17
Branch analysis from position: 4
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 15
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 15
Branch analysis from position: 6
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 13
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 13
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 13
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 15
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/GOg7Z
function name:  (null)
number of ops:  22
compiled vars:  !0 = $json, !1 = $merged, !2 = $j1, !3 = $j2, !4 = $j3, !5 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   37     1        ASSIGN                                                   !1, <array>
   38     2      > FE_RESET_R                                       $8      !0, ->17
          3    > > FE_FETCH_R                                               $8, !2, ->17
   40     4    > > FE_RESET_R                                       $9      !2, ->15
          5    > > FE_FETCH_R                                               $9, !3, ->15
   42     6    > > FE_RESET_R                                       $10     !3, ->13
          7    > > FE_FETCH_R                                       ~11     $10, !4, ->13
          8    >   ASSIGN                                                   !5, ~11
   44     9        FETCH_DIM_W                                      $13     !1, !5
         10        ASSIGN_DIM                                               $13
         11        OP_DATA                                                  !4
   42    12      > JMP                                                      ->7
         13    >   FE_FREE                                                  $10
   40    14      > JMP                                                      ->5
         15    >   FE_FREE                                                  $9
   38    16      > JMP                                                      ->3
         17    >   FE_FREE                                                  $8
   49    18        INIT_FCALL                                               'print_r'
         19        SEND_VAR                                                 !1
         20        DO_ICALL                                                 
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.45 ms | 1396 KiB | 15 Q