3v4l.org

run code in 300+ PHP versions simultaneously
<?php $houses = [ ['id' => 332, 'title' => 'biba'], ['id' => 2222, 'title' => 'boba'], ['id' => 5566, 'title' => 'aboba'], ]; $result = array_map( fn(array $item) => [$item['id'] => $item['title']], $houses ); print_r($result);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pJnMF
function name:  (null)
number of ops:  11
compiled vars:  !0 = $houses, !1 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, <array>
   10     1        INIT_FCALL                                               'array_map'
   11     2        DECLARE_LAMBDA_FUNCTION                          ~3      [0]
          3        SEND_VAL                                                 ~3
   12     4        SEND_VAR                                                 !0
   10     5        DO_ICALL                                         $4      
          6        ASSIGN                                                   !1, $4
   16     7        INIT_FCALL                                               'print_r'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                                 
         10      > 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/pJnMF
function name:  {closure}
number of ops:  6
compiled vars:  !0 = $item
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
          1        FETCH_DIM_R                                      ~1      !0, 'id'
          2        FETCH_DIM_R                                      ~2      !0, 'title'
          3        INIT_ARRAY                                       ~3      ~2, ~1
          4      > RETURN                                                   ~3
          5*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.01 ms | 1427 KiB | 15 Q