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 = []; $it = new RecursiveIteratorIterator(new RecursiveArrayIterator($array)); foreach ($it as $k => $_) { $result[$k] = ($result[$k] ?? 0) + 1; } var_export($result);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 10, Position 2 = 19
Branch analysis from position: 10
2 jumps found. (Code = 78) Position 1 = 11, Position 2 = 19
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/ovNbl
function name:  (null)
number of ops:  24
compiled vars:  !0 = $array, !1 = $result, !2 = $it, !3 = $_, !4 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   15     1        ASSIGN                                                   !1, <array>
   16     2        NEW                                              $7      'RecursiveIteratorIterator'
          3        NEW                                              $8      'RecursiveArrayIterator'
          4        SEND_VAR_EX                                              !0
          5        DO_FCALL                                      0          
          6        SEND_VAR_NO_REF_EX                                       $8
          7        DO_FCALL                                      0          
          8        ASSIGN                                                   !2, $7
   17     9      > FE_RESET_R                                       $12     !2, ->19
         10    > > FE_FETCH_R                                       ~13     $12, !3, ->19
         11    >   ASSIGN                                                   !4, ~13
   18    12        FETCH_DIM_IS                                     ~16     !1, !4
         13        COALESCE                                         ~17     ~16
         14        QM_ASSIGN                                        ~17     0
         15        ADD                                              ~18     ~17, 1
         16        ASSIGN_DIM                                               !1, !4
         17        OP_DATA                                                  ~18
   17    18      > JMP                                                      ->10
         19    >   FE_FREE                                                  $12
   20    20        INIT_FCALL                                               'var_export'
         21        SEND_VAR                                                 !1
         22        DO_ICALL                                                 
         23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.96 ms | 1000 KiB | 14 Q