3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr=array(1=>1,2=>2); $count=count($arr); foreach($arr as $key=>$value){ if($key%2==0){ unset($arr[$key]); $count--; } if(1!=$count) continue; else return $key; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 18
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 18
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 11
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 15
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
filename:       /in/8upBo
function name:  (null)
number of ops:  20
compiled vars:  !0 = $arr, !1 = $count, !2 = $value, !3 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        COUNT                                            ~5      !0
          2        ASSIGN                                                   !1, ~5
    4     3      > FE_RESET_R                                       $7      !0, ->18
          4    > > FE_FETCH_R                                       ~8      $7, !2, ->18
          5    >   ASSIGN                                                   !3, ~8
    5     6        MOD                                              ~10     !3, 2
          7        IS_EQUAL                                                 ~10, 0
          8      > JMPZ                                                     ~11, ->11
    6     9    >   UNSET_DIM                                                !0, !3
    7    10        PRE_DEC                                                  !1
    9    11    >   IS_NOT_EQUAL                                             !1, 1
         12      > JMPZ                                                     ~13, ->15
   10    13    > > JMP                                                      ->4
         14*       JMP                                                      ->17
   12    15    >   FE_FREE                                                  $7
         16      > RETURN                                                   !3
    4    17*       JMP                                                      ->4
         18    >   FE_FREE                                                  $7
   13    19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.25 ms | 1394 KiB | 13 Q