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--; } var_dump($arr); echo $count; if(1!=$count) continue; else echo $key; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 21
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 21
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 = 17, Position 2 = 19
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 11
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/DS5sm
function name:  (null)
number of ops:  23
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, ->21
          4    > > FE_FETCH_R                                       ~8      $7, !2, ->21
          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    >   INIT_FCALL                                               'var_dump'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                                 
   10    14        ECHO                                                     !1
   11    15        IS_NOT_EQUAL                                             !1, 1
         16      > JMPZ                                                     ~14, ->19
   12    17    > > JMP                                                      ->4
         18*       JMP                                                      ->20
   14    19    >   ECHO                                                     !3
    4    20      > JMP                                                      ->4
         21    >   FE_FREE                                                  $7
   15    22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.25 ms | 1387 KiB | 15 Q