3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = array ( 'rows' => array ( 0 => array ( 'position' => 1, 'image_id' => 2809, 'basename' => 'rj5ed2c90f609423.26673093.jpg' ), 1 => array ( 'position' => 1, 'image_id' => 2808, 'basename' => 'rj5ed2c8eccc9c06.91700011.jpg' ), 2 => array ( 'position' => 2, 'image_id' => 2807, 'basename' => 'rj5ed2c77ef32b76.96579137.jpg' ) ) ); $data['rows'] = array_reduce($data['rows'], function ($c, $a) { $c[$a['position']][] = $a; return $c; }, array()); print_r($data);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jLF0l
function name:  (null)
number of ops:  14
compiled vars:  !0 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   27     1        INIT_FCALL                                               'array_reduce'
          2        FETCH_DIM_R                                      ~3      !0, 'rows'
          3        SEND_VAL                                                 ~3
          4        DECLARE_LAMBDA_FUNCTION                          ~4      [0]
   30     5        SEND_VAL                                                 ~4
          6        SEND_VAL                                                 <array>
   27     7        DO_ICALL                                         $5      
          8        ASSIGN_DIM                                               !0, 'rows'
   30     9        OP_DATA                                                  $5
   32    10        INIT_FCALL                                               'print_r'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                                 
         13      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jLF0l
function name:  {closure}
number of ops:  8
compiled vars:  !0 = $c, !1 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   27     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   28     2        FETCH_DIM_R                                      ~2      !1, 'position'
          3        FETCH_DIM_W                                      $3      !0, ~2
          4        ASSIGN_DIM                                               $3
          5        OP_DATA                                                  !1
   29     6      > RETURN                                                   !0
   30     7*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.92 ms | 999 KiB | 15 Q