3v4l.org

run code in 300+ PHP versions simultaneously
<?php $callback = function ( &$value, $key, $extra = 1 ) { $value += $extra; }; $fruit = array( 'lemons' => 2 ); array_walk( $fruit, $callback ); var_dump( $fruit['lemons'] );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UTvdc
function name:  (null)
number of ops:  12
compiled vars:  !0 = $callback, !1 = $fruit
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FUTvdc%3A2%240'
          1        ASSIGN                                                   !0, ~2
    3     2        ASSIGN                                                   !1, <array>
    4     3        INIT_FCALL                                               'array_walk'
          4        SEND_REF                                                 !1
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                                 
    5     7        INIT_FCALL                                               'var_dump'
          8        FETCH_DIM_R                                      ~6      !1, 'lemons'
          9        SEND_VAL                                                 ~6
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FUTvdc%3A2%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UTvdc
function name:  {closure}
number of ops:  5
compiled vars:  !0 = $value, !1 = $key, !2 = $extra
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV_INIT                                        !2      1
          3        ASSIGN_OP                                     1          !0, !2
          4      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FUTvdc%3A2%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.47 ms | 1386 KiB | 17 Q