3v4l.org

run code in 300+ PHP versions simultaneously
<?php $path = null; $list = array('k1' => 'f1.txt', 'k2' => 'f2.txt', 'k3' => 'f3.txt', 'k4' => 'f4.txt'); //$mapping = array_map(function($item) use ($path) { return $path ? $path . $item : $item; }, $list); $pfxFilePath = 'pfxFilePath'; $passFilePath = 'passFilePath'; array_walk($list, function(&$item, $i) use ($pfxFilePath, $passFilePath) { $item.= $pfxFilePath . $passFilePath; }); var_dump($list);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fRWUr
function name:  (null)
number of ops:  15
compiled vars:  !0 = $path, !1 = $list, !2 = $pfxFilePath, !3 = $passFilePath
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, null
    3     1        ASSIGN                                                   !1, <array>
    5     2        ASSIGN                                                   !2, 'pfxFilePath'
    6     3        ASSIGN                                                   !3, 'passFilePath'
    7     4        INIT_FCALL                                               'array_walk'
          5        SEND_REF                                                 !1
          6        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FfRWUr%3A7%240'
          7        BIND_LEXICAL                                             ~8, !2
          8        BIND_LEXICAL                                             ~8, !3
    9     9        SEND_VAL                                                 ~8
         10        DO_ICALL                                                 
   11    11        INIT_FCALL                                               'var_dump'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FfRWUr%3A7%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fRWUr
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $item, !1 = $i, !2 = $pfxFilePath, !3 = $passFilePath
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        BIND_STATIC                                              !2
          3        BIND_STATIC                                              !3
    8     4        CONCAT                                           ~4      !2, !3
          5        ASSIGN_OP                                     8          !0, ~4
    9     6      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FfRWUr%3A7%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
181.53 ms | 1395 KiB | 17 Q