3v4l.org

run code in 300+ PHP versions simultaneously
<?php $full = [ 'Cars' => [ 'Volvo' => 0, 'Mercedes' => 0, 'BMW' => 0, 'Audi' => 0 ], 'Motorcycle' => [ 'Ducati' => 0, 'Honda' => 0, 'Suzuki' => 0, 'KTM' => 0 ] ]; $semi = [ 'Volvo' => 1, 'Audi' => 1 ]; foreach ($full as &$manufacturers) { foreach ($manufacturers as $m => &$count) { $count += $semi[$m] ?? 0; } } var_export($full);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 125) Position 1 = 3, Position 2 = 14
Branch analysis from position: 3
2 jumps found. (Code = 126) Position 1 = 4, Position 2 = 14
Branch analysis from position: 4
2 jumps found. (Code = 125) Position 1 = 5, Position 2 = 12
Branch analysis from position: 5
2 jumps found. (Code = 126) Position 1 = 6, Position 2 = 12
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 12
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/IoHmj
function name:  (null)
number of ops:  19
compiled vars:  !0 = $full, !1 = $semi, !2 = $manufacturers, !3 = $count, !4 = $m
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   18     1        ASSIGN                                                   !1, <array>
   23     2      > FE_RESET_RW                                      $7      !0, ->14
          3    > > FE_FETCH_RW                                              $7, !2, ->14
   24     4    > > FE_RESET_RW                                      $8      !2, ->12
          5    > > FE_FETCH_RW                                      ~9      $8, !3, ->12
          6    >   ASSIGN                                                   !4, ~9
   25     7        FETCH_DIM_IS                                     ~11     !1, !4
          8        COALESCE                                         ~12     ~11
          9        QM_ASSIGN                                        ~12     0
         10        ASSIGN_OP                                     1          !3, ~12
   24    11      > JMP                                                      ->5
         12    >   FE_FREE                                                  $8
   23    13      > JMP                                                      ->3
         14    >   FE_FREE                                                  $7
   28    15        INIT_FCALL                                               'var_export'
         16        SEND_VAR                                                 !0
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.22 ms | 1002 KiB | 14 Q