3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array(1,2,3,4); $b = array('a', 'b', 'c'); print_r($a); array_walk($a, function(&$item) use ($a) { $item *= 2; }); print_r($a);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UBtJI
function name:  (null)
number of ops:  15
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, <array>
    5     2        INIT_FCALL                                               'print_r'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                                 
    6     5        INIT_FCALL                                               'array_walk'
          6        SEND_REF                                                 !0
          7        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FUBtJI%3A6%240'
          8        BIND_LEXICAL                                             ~5, !0
    8     9        SEND_VAL                                                 ~5
         10        DO_ICALL                                                 
    9    11        INIT_FCALL                                               'print_r'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

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

End of function %00%7Bclosure%7D%2Fin%2FUBtJI%3A6%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.18 ms | 1386 KiB | 17 Q