3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array( array('value' => 1), array('value' => 2), array('value' => 3), ); $count = 0; foreach ($array as $key => $innerArray) { foreach ($innerArray as $innerKey => $value) { $count += $value; // and do something with $key and $innerKey } } echo $count;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 12
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 12
Branch analysis from position: 4
2 jumps found. (Code = 77) Position 1 = 6, Position 2 = 10
Branch analysis from position: 6
2 jumps found. (Code = 78) Position 1 = 7, Position 2 = 10
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 10
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
filename:       /in/C0WRQ
function name:  (null)
number of ops:  15
compiled vars:  !0 = $array, !1 = $count, !2 = $innerArray, !3 = $key, !4 = $value, !5 = $innerKey
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, <array>
   10     1        ASSIGN                                                   !1, 0
   11     2      > FE_RESET_R                                       $8      !0, ->12
          3    > > FE_FETCH_R                                       ~9      $8, !2, ->12
          4    >   ASSIGN                                                   !3, ~9
   12     5      > FE_RESET_R                                       $11     !2, ->10
          6    > > FE_FETCH_R                                       ~12     $11, !4, ->10
          7    >   ASSIGN                                                   !5, ~12
   13     8        ASSIGN_OP                                     1          !1, !4
   12     9      > JMP                                                      ->6
         10    >   FE_FREE                                                  $11
   11    11      > JMP                                                      ->3
         12    >   FE_FREE                                                  $8
   19    13        ECHO                                                     !1
         14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.63 ms | 1385 KiB | 13 Q