3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ [ "country", "state", "city", "name", "address", "gender", "status" ], [ "Argentina", "Corrientes", "Corrientes", "Jorge", "Avenida Avellaneda 12", "Masculino", "Activo" ], [ "Argentina", "Chaco", "Resistencia", "Mariano", "Avenida Peron 12", "Masculino", "Activo" ] ]; var_export( array_reduce( $array, function ($result, $row) { static $header; if (!$header) { $header = $row; } else { $result[] = array_combine($header, $row); } return $result; }, [] ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jLIZr
function name:  (null)
number of ops:  11
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   33     1        INIT_FCALL                                               'var_export'
   34     2        INIT_FCALL                                               'array_reduce'
   35     3        SEND_VAR                                                 !0
   36     4        DECLARE_LAMBDA_FUNCTION                          ~2      [0]
   44     5        SEND_VAL                                                 ~2
   45     6        SEND_VAL                                                 <array>
   34     7        DO_ICALL                                         $3      
   45     8        SEND_VAR                                                 $3
   33     9        DO_ICALL                                                 
   47    10      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 7
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jLIZr
function name:  {closure}
number of ops:  15
compiled vars:  !0 = $result, !1 = $row, !2 = $header
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   36     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   37     2        BIND_STATIC                                              !2
   38     3        BOOL_NOT                                         ~3      !2
          4      > JMPZ                                                     ~3, ->7
   39     5    >   ASSIGN                                                   !2, !1
   38     6      > JMP                                                      ->13
   41     7    >   INIT_FCALL                                               'array_combine'
          8        SEND_VAR                                                 !2
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                         $6      
         11        ASSIGN_DIM                                               !0
         12        OP_DATA                                                  $6
   43    13    > > RETURN                                                   !0
   44    14*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.62 ms | 1005 KiB | 16 Q