3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arrays = [ [ "id" => 1, "order_id" => 1, "image_url" => "/resources/filename1" ], [ "id" => 2, "order_id" => 1, "image_url" => "/resources/filename2" ] ]; foreach($arrays as $array) { $result[$array['order_id']][]=$array['image_url']; } print_r($result);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 9
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 9
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
filename:       /in/rJ5OW
function name:  (null)
number of ops:  14
compiled vars:  !0 = $arrays, !1 = $array, !2 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   15     1      > FE_RESET_R                                       $4      !0, ->9
          2    > > FE_FETCH_R                                               $4, !1, ->9
   16     3    >   FETCH_DIM_R                                      ~5      !1, 'order_id'
          4        FETCH_DIM_R                                      ~8      !1, 'image_url'
          5        FETCH_DIM_W                                      $6      !2, ~5
          6        ASSIGN_DIM                                               $6
          7        OP_DATA                                                  ~8
   15     8      > JMP                                                      ->2
          9    >   FE_FREE                                                  $4
   19    10        INIT_FCALL                                               'print_r'
         11        SEND_VAR                                                 !2
         12        DO_ICALL                                                 
         13      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
176.84 ms | 1394 KiB | 15 Q