3v4l.org

run code in 300+ PHP versions simultaneously
<?php $items = array( array( array("Color" => "Blue"), array("Size" => "S") ), array( array("Color" => "Blue"), array("Size" => "M") ) ); $new_items = array_map(function ($item) { return array_map(function ($key_values) { return array_reduce($key_values, function ($seed, $value, $key) { $seed[$key] = $value; }); }, $item); }, $items);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/d7URn
function name:  (null)
number of ops:  8
compiled vars:  !0 = $items, !1 = $new_items
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   12     1        INIT_FCALL                                               'array_map'
          2        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2Fd7URn%3A12%240'
   18     3        SEND_VAL                                                 ~3
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $4      
   12     6        ASSIGN                                                   !1, $4
   18     7      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2Fd7URn%3A12%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/d7URn
function name:  {closure}
number of ops:  8
compiled vars:  !0 = $item
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
   13     1        INIT_FCALL                                               'array_map'
          2        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2Fd7URn%3A13%241'
   17     3        SEND_VAL                                                 ~1
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $2      
          6      > RETURN                                                   $2
   18     7*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2Fd7URn%3A12%240

Function %00%7Bclosure%7D%2Fin%2Fd7URn%3A13%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/d7URn
function name:  {closure}
number of ops:  8
compiled vars:  !0 = $key_values
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
   14     1        INIT_FCALL                                               'array_reduce'
          2        SEND_VAR                                                 !0
          3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2Fd7URn%3A14%242'
   16     4        SEND_VAL                                                 ~1
          5        DO_ICALL                                         $2      
          6      > RETURN                                                   $2
   17     7*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2Fd7URn%3A13%241

Function %00%7Bclosure%7D%2Fin%2Fd7URn%3A14%242:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/d7URn
function name:  {closure}
number of ops:  6
compiled vars:  !0 = $seed, !1 = $value, !2 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
   15     3        ASSIGN_DIM                                               !0, !2
          4        OP_DATA                                                  !1
   16     5      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2Fd7URn%3A14%242

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
189.87 ms | 1400 KiB | 17 Q