3v4l.org

run code in 300+ PHP versions simultaneously
<?php $mergedArray = [ 'story' => 10, 'image' => 20, 'video' => 30, 'audio' => 40, ]; array_walk($mergedArray, function (&$value, $key) { $value = ucwords($key) . "($value)"; }); print_r($mergedArray);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/533d2
function name:  (null)
number of ops:  10
compiled vars:  !0 = $mergedArray
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   10     1        INIT_FCALL                                               'array_walk'
          2        SEND_REF                                                 !0
          3        DECLARE_LAMBDA_FUNCTION                          ~2      [0]
          4        SEND_VAL                                                 ~2
          5        DO_ICALL                                                 
   11     6        INIT_FCALL                                               'print_r'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
          9      > 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/533d2
function name:  {closure}
number of ops:  11
compiled vars:  !0 = $value, !1 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        INIT_FCALL                                               'ucwords'
          3        SEND_VAR                                                 !1
          4        DO_ICALL                                         $2      
          5        ROPE_INIT                                     3  ~4      '%28'
          6        ROPE_ADD                                      1  ~4      ~4, !0
          7        ROPE_END                                      2  ~3      ~4, '%29'
          8        CONCAT                                           ~6      $2, ~3
          9        ASSIGN                                                   !0, ~6
         10      > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.13 ms | 999 KiB | 16 Q