3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Everything you enter here will be executed by our servers. Try it! $wineBuys = array ( '2013-09-12' => 20, '2013-09-13' => 10, '2013-09-14' => 49 ); $hamBuys = array ( '2013-09-12' => 1, '2013-09-13' => 16, '2013-09-14' => 2 ); $cheeseBuys = array ( '2013-09-12' => 5, '2013-09-13' => 6, '2013-09-14' => 12 ); $calcByDate = array(); foreach ($wineBuys as $key => $value) { if (! array_key_exists($key, $calcByDate)) { $calcByDate[$key] = array($wineBuys[$key]); } else { $calcByDate[$key][] = $wineBuys[$key]; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 20
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 20
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 15
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
filename:       /in/EEVAp
function name:  (null)
number of ops:  22
compiled vars:  !0 = $wineBuys, !1 = $hamBuys, !2 = $cheeseBuys, !3 = $calcByDate, !4 = $value, !5 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ASSIGN                                                   !0, <array>
   10     1        ASSIGN                                                   !1, <array>
   15     2        ASSIGN                                                   !2, <array>
   21     3        ASSIGN                                                   !3, <array>
   23     4      > FE_RESET_R                                       $10     !0, ->20
          5    > > FE_FETCH_R                                       ~11     $10, !4, ->20
          6    >   ASSIGN                                                   !5, ~11
   24     7        ARRAY_KEY_EXISTS                                 ~13     !5, !3
          8        BOOL_NOT                                         ~14     ~13
          9      > JMPZ                                                     ~14, ->15
   25    10    >   FETCH_DIM_R                                      ~16     !0, !5
         11        INIT_ARRAY                                       ~17     ~16
         12        ASSIGN_DIM                                               !3, !5
         13        OP_DATA                                                  ~17
         14      > JMP                                                      ->19
   28    15    >   FETCH_DIM_R                                      ~20     !0, !5
         16        FETCH_DIM_W                                      $18     !3, !5
         17        ASSIGN_DIM                                               $18
         18        OP_DATA                                                  ~20
   23    19    > > JMP                                                      ->5
         20    >   FE_FREE                                                  $10
   30    21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.32 ms | 1385 KiB | 13 Q