3v4l.org

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

Function %00%7Bclosure%7D%2Fin%2FhtuOf%3A10%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/htuOf
function name:  {closure}
number of ops:  6
compiled vars:  !0 = $value, !1 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   11     2        INIT_FCALL                                               'var_dump'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                                 
   12     5      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FhtuOf%3A10%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.9 ms | 1395 KiB | 17 Q