3v4l.org

run code in 300+ PHP versions simultaneously
<?php $keywords = [['keyword'=>'designing'],['keyword'=>'logo designing']]; $user_id = 5; var_export( array_map( fn($v) => ['user_id' => $user_id] + $v, $keywords ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GjDn3
function name:  (null)
number of ops:  12
compiled vars:  !0 = $keywords, !1 = $user_id
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, 5
    6     2        INIT_FCALL                                               'var_export'
    7     3        INIT_FCALL                                               'array_map'
    8     4        DECLARE_LAMBDA_FUNCTION                          ~4      [0]
          5        BIND_LEXICAL                                             ~4, !1
          6        SEND_VAL                                                 ~4
    9     7        SEND_VAR                                                 !0
    7     8        DO_ICALL                                         $5      
    9     9        SEND_VAR                                                 $5
    6    10        DO_ICALL                                                 
   11    11      > 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/GjDn3
function name:  {closure}
number of ops:  6
compiled vars:  !0 = $v, !1 = $user_id
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
          2        INIT_ARRAY                                       ~2      !1, 'user_id'
          3        ADD                                              ~3      ~2, !0
          4      > RETURN                                                   ~3
          5*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.23 ms | 1011 KiB | 15 Q