3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ ['term_title' => 'black'], ['color_quantity' => 2], ['color_price' => 22], ['term_title' => 'blue'], ['color_quantity' => 3], ['color_price' => 33], ]; // form groups, then flatten each group var_export( array_map( function($v) { return array_merge(...$v); }, array_chunk($array, 3) ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MSZbb
function name:  (null)
number of ops:  14
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   12     1        INIT_FCALL                                               'var_export'
   13     2        INIT_FCALL                                               'array_map'
   14     3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FMSZbb%3A14%240'
   16     4        SEND_VAL                                                 ~2
   17     5        INIT_FCALL                                               'array_chunk'
          6        SEND_VAR                                                 !0
          7        SEND_VAL                                                 3
          8        DO_ICALL                                         $3      
          9        SEND_VAR                                                 $3
         10        DO_ICALL                                         $4      
         11        SEND_VAR                                                 $4
         12        DO_ICALL                                                 
   19    13      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FMSZbb%3A14%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MSZbb
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
   15     1        INIT_FCALL                                               'array_merge'
          2        SEND_UNPACK                                              !0
          3        CHECK_UNDEF_ARGS                                         
          4        DO_ICALL                                         $1      
          5      > RETURN                                                   $1
   16     6*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FMSZbb%3A14%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
130.39 ms | 943 KiB | 22 Q