3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ ['cs_map_id' => 84, 'cs_subject_id' => 1], ['cs_map_id' => 85, 'cs_subject_id' => 5], ]; $padWith = ['flag' => 1]; array_walk( $array, fn(&$v, $k, $extra) => $v += $extra, $padWith ); var_export($array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/38IMq
function name:  (null)
number of ops:  12
compiled vars:  !0 = $array, !1 = $padWith
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    8     1        ASSIGN                                                   !1, <array>
   10     2        INIT_FCALL                                               'array_walk'
   11     3        SEND_REF                                                 !0
   12     4        DECLARE_LAMBDA_FUNCTION                          ~4      [0]
          5        SEND_VAL                                                 ~4
   13     6        SEND_VAR                                                 !1
   10     7        DO_ICALL                                                 
   15     8        INIT_FCALL                                               'var_export'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                                 
         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/38IMq
function name:  {closure}
number of ops:  6
compiled vars:  !0 = $v, !1 = $k, !2 = $extra
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        ASSIGN_OP                                     1  ~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:
166.44 ms | 1005 KiB | 15 Q