3v4l.org

run code in 500+ PHP versions simultaneously
<?php $array = ['name' => 'aalaap','age' => 29, 'location' => 'mumbai']; var_export( array_reduce( array_keys($array), fn($result, $k) => array_merge($result, [$k, $array[$k]]), [] ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hDY7J
function name:  (null)
number of ops:  15
compiled vars:  !0 = $array
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
    5     1        INIT_FCALL                                                   'var_export'
    6     2        INIT_FCALL                                                   'array_reduce'
    7     3        INIT_FCALL                                                   'array_keys'
          4        SEND_VAR                                                     !0
          5        DO_ICALL                                             $2      
          6        SEND_VAR                                                     $2
    8     7        DECLARE_LAMBDA_FUNCTION                              ~3      [0]
          8        BIND_LEXICAL                                                 ~3, !0
          9        SEND_VAL                                                     ~3
    9    10        SEND_VAL                                                     <array>
    6    11        DO_ICALL                                             $4      
    9    12        SEND_VAR                                                     $4
    5    13        DO_ICALL                                                     
   11    14      > 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/hDY7J
function name:  {closure:/in/hDY7J:8}
number of ops:  12
compiled vars:  !0 = $result, !1 = $k, !2 = $array
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    8     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
          2        BIND_STATIC                                                  !2
          3        INIT_FCALL                                                   'array_merge'
          4        SEND_VAR                                                     !0
          5        INIT_ARRAY                                           ~3      !1
          6        FETCH_DIM_R                                          ~4      !2, !1
          7        ADD_ARRAY_ELEMENT                                    ~3      ~4
          8        SEND_VAL                                                     ~3
          9        DO_ICALL                                             $5      
         10      > RETURN                                                       $5
         11*     > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
142.26 ms | 1484 KiB | 17 Q