3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [ [1, 2, 3, 4], ['one', 'two', 'three', 'four'] ]; // I want to add this functin to the PHP function combine_array_items ( $arr ) { return array_map(function (...$r) { return $r; }, ...$arr); } print_r( combine_array_items ( $arr ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IveOG
function name:  (null)
number of ops:  8
compiled vars:  !0 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   17     1        INIT_FCALL                                               'print_r'
          2        INIT_FCALL                                               'combine_array_items'
          3        SEND_VAR                                                 !0
          4        DO_FCALL                                      0  $2      
          5        SEND_VAR                                                 $2
          6        DO_ICALL                                                 
          7      > RETURN                                                   1

Function combine_array_items:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IveOG
function name:  combine_array_items
number of ops:  9
compiled vars:  !0 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
   11     1        INIT_FCALL                                               'array_map'
          2        DECLARE_LAMBDA_FUNCTION                          ~1      [0]
   13     3        SEND_VAL                                                 ~1
          4        SEND_UNPACK                                              !0
          5        CHECK_UNDEF_ARGS                                         
   11     6        DO_ICALL                                         $2      
   13     7      > RETURN                                                   $2
   15     8*     > RETURN                                                   null


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IveOG
function name:  {closure}
number of ops:  3
compiled vars:  !0 = $r
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV_VARIADIC                                    !0      
   12     1      > RETURN                                                   !0
   13     2*     > RETURN                                                   null

End of Dynamic Function 0

End of function combine_array_items

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
134.05 ms | 1014 KiB | 16 Q