3v4l.org

run code in 300+ PHP versions simultaneously
<?php $rss = (object) [ 'items' => [ ['foo' => 'bar1'], ['foo' => 'bar2'], ['foo' => 'bar3'], ], ]; $feedId = 42; $rss->items = array_map( fn($item) => $item + ['feed_id' => $feedId], $rss->items ); var_export($rss);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lvF4Y
function name:  (null)
number of ops:  16
compiled vars:  !0 = $rss, !1 = $feedId
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   CAST                                          8  ~2      <array>
    3     1        ASSIGN                                                   !0, ~2
   11     2        ASSIGN                                                   !1, 42
   12     3        INIT_FCALL                                               'array_map'
   13     4        DECLARE_LAMBDA_FUNCTION                          ~6      [0]
          5        BIND_LEXICAL                                             ~6, !1
          6        SEND_VAL                                                 ~6
   14     7        FETCH_OBJ_R                                      ~7      !0, 'items'
          8        SEND_VAL                                                 ~7
   12     9        DO_ICALL                                         $8      
         10        ASSIGN_OBJ                                               !0, 'items'
   14    11        OP_DATA                                                  $8
   16    12        INIT_FCALL                                               'var_export'
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                                 
         15      > 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/lvF4Y
function name:  {closure}
number of ops:  6
compiled vars:  !0 = $item, !1 = $feedId
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
          2        INIT_ARRAY                                       ~2      !1, 'feed_id'
          3        ADD                                              ~3      !0, ~2
          4      > RETURN                                                   ~3
          5*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.06 ms | 1010 KiB | 16 Q