3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ 1 => [1, 12, 2], 2 => [1, 13, 3], 3 => [1, 12, 2], 4 => [1], 5 => [1] ]; array_walk_recursive($array, function($v)use(&$output) { if (isset($output[$v])) { ++$output[$v]; } else { $output[$v] = 1; } }); var_export($output);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/j2LM0
function name:  (null)
number of ops:  11
compiled vars:  !0 = $array, !1 = $output
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   10     1        INIT_FCALL                                               'array_walk_recursive'
          2        SEND_REF                                                 !0
          3        DECLARE_LAMBDA_FUNCTION                          ~3      [0]
          4        BIND_LEXICAL                                             ~3, !1
   16     5        SEND_VAL                                                 ~3
   10     6        DO_ICALL                                                 
   18     7        INIT_FCALL                                               'var_export'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                                 
         10      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 7
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/j2LM0
function name:  {closure}
number of ops:  10
compiled vars:  !0 = $v, !1 = $output
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
   11     2        ISSET_ISEMPTY_DIM_OBJ                         0          !1, !0
          3      > JMPZ                                                     ~2, ->7
   12     4    >   FETCH_DIM_RW                                     $3      !1, !0
          5        PRE_INC                                                  $3
   11     6      > JMP                                                      ->9
   14     7    >   ASSIGN_DIM                                               !1, !0
          8        OP_DATA                                                  1
   16     9    > > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.08 ms | 999 KiB | 15 Q