3v4l.org

run code in 300+ PHP versions simultaneously
<?php $it = new ArrayIterator(); $it[] = 'foo'; $it[] = 'bar'; array_walk($it, function($v, $k) { echo "$k => $v", PHP_EOL; }); array_map(function($v, $k) { echo "$k => $v", PHP_EOL; }, $it);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4TOQj
function name:  (null)
number of ops:  18
compiled vars:  !0 = $it
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $1      'ArrayIterator'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
    4     3        ASSIGN_DIM                                               !0
          4        OP_DATA                                                  'foo'
    5     5        ASSIGN_DIM                                               !0
          6        OP_DATA                                                  'bar'
    7     7        INIT_FCALL                                               'array_walk'
          8        SEND_REF                                                 !0
          9        DECLARE_LAMBDA_FUNCTION                          ~6      [0]
         10        SEND_VAL                                                 ~6
         11        DO_ICALL                                                 
    8    12        INIT_FCALL                                               'array_map'
         13        DECLARE_LAMBDA_FUNCTION                          ~8      [1]
         14        SEND_VAL                                                 ~8
         15        SEND_VAR                                                 !0
         16        DO_ICALL                                                 
         17      > 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/4TOQj
function name:  {closure}
number of ops:  8
compiled vars:  !0 = $v, !1 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        ROPE_INIT                                     3  ~3      !1
          3        ROPE_ADD                                      1  ~3      ~3, '+%3D%3E+'
          4        ROPE_END                                      2  ~2      ~3, !0
          5        ECHO                                                     ~2
          6        ECHO                                                     '%0A'
          7      > RETURN                                                   null

End of Dynamic Function 0

Dynamic Function 1
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4TOQj
function name:  {closure}
number of ops:  8
compiled vars:  !0 = $v, !1 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        ROPE_INIT                                     3  ~3      !1
          3        ROPE_ADD                                      1  ~3      ~3, '+%3D%3E+'
          4        ROPE_END                                      2  ~2      ~3, !0
          5        ECHO                                                     ~2
          6        ECHO                                                     '%0A'
          7      > RETURN                                                   null

End of Dynamic Function 1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.09 ms | 1000 KiB | 15 Q