3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ [ ["2011-11-18 00:00:00" => 'C'], ["2011-11-18 00:00:00" => 'I'], ["2011-11-18 00:00:00" => 'S'], ], [ ["2011-11-22 00:00:00" => 'C'], ["2011-11-22 00:00:00" => 'S'] ] ]; $result = []; array_walk_recursive($array, function ($_, $k) use (&$result) { $result[$k] = ($result[$k] ?? 0) + 1; }); var_export($result);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tRonD
function name:  (null)
number of ops:  12
compiled vars:  !0 = $array, !1 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   15     1        ASSIGN                                                   !1, <array>
   16     2        INIT_FCALL                                               'array_walk_recursive'
          3        SEND_REF                                                 !0
          4        DECLARE_LAMBDA_FUNCTION                          ~4      [0]
          5        BIND_LEXICAL                                             ~4, !1
          6        SEND_VAL                                                 ~4
          7        DO_ICALL                                                 
   17     8        INIT_FCALL                                               'var_export'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                                 
         11      > 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/tRonD
function name:  {closure}
number of ops:  10
compiled vars:  !0 = $_, !1 = $k, !2 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        BIND_STATIC                                              !2
          3        FETCH_DIM_IS                                     ~4      !2, !1
          4        COALESCE                                         ~5      ~4
          5        QM_ASSIGN                                        ~5      0
          6        ADD                                              ~6      ~5, 1
          7        ASSIGN_DIM                                               !2, !1
          8        OP_DATA                                                  ~6
          9      > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
132.12 ms | 1006 KiB | 15 Q