3v4l.org

run code in 300+ PHP versions simultaneously
<?php $q = range(100); $result = array(); foreach($q as $key => $value) { if (0 === $value % 2) { $result = $key; } } var_dump($result);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 6, Position 2 = 13
Branch analysis from position: 6
2 jumps found. (Code = 78) Position 1 = 7, Position 2 = 13
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 12
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 12
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
filename:       /in/X2hcK
function name:  (null)
number of ops:  18
compiled vars:  !0 = $q, !1 = $result, !2 = $value, !3 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'range'
          1        SEND_VAL                                                 100
          2        DO_ICALL                                         $4      
          3        ASSIGN                                                   !0, $4
    5     4        ASSIGN                                                   !1, <array>
    6     5      > FE_RESET_R                                       $7      !0, ->13
          6    > > FE_FETCH_R                                       ~8      $7, !2, ->13
          7    >   ASSIGN                                                   !3, ~8
    7     8        MOD                                              ~10     !2, 2
          9        IS_IDENTICAL                                             ~10, 0
         10      > JMPZ                                                     ~11, ->12
    8    11    >   ASSIGN                                                   !1, !3
    6    12    > > JMP                                                      ->6
         13    >   FE_FREE                                                  $7
   12    14        INIT_FCALL                                               'var_dump'
         15        SEND_VAR                                                 !1
         16        DO_ICALL                                                 
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.64 ms | 1386 KiB | 17 Q