3v4l.org

run code in 300+ PHP versions simultaneously
<!DOCTYPE html> <html> <body> <?php $even=0; $odd=0; $even_sum=0; $val_array = array(111, 56542, 893, 2354, 4545, 786, 9657, 3268, 4879, 9351, 7414, 4215, 3217, 1420); for ($i=0; $i < count($val_array); $i++) { if ($val_array[$i] % 2 == 0) { $even++; $even_sum=$even_sum + $val_array[$i]; } else { $odd++; } } echo "Total Even Numbers: " .$even."</br>"; echo "Total Odd Numbers: " .$odd."</br>"; echo $even_sum; ?> </body> </html>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 7
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 16
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 7
Branch analysis from position: 21
Branch analysis from position: 7
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 7
Branch analysis from position: 21
Branch analysis from position: 7
filename:       /in/Ct9om
function name:  (null)
number of ops:  30
compiled vars:  !0 = $even, !1 = $odd, !2 = $even_sum, !3 = $val_array, !4 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    1     0  E >   ECHO                                                     '%3C%21DOCTYPE+html%3E%0A%3Chtml%3E%0A%09%3Cbody%3E%0A%09%09'
    5     1        ASSIGN                                                   !0, 0
    6     2        ASSIGN                                                   !1, 0
    7     3        ASSIGN                                                   !2, 0
    8     4        ASSIGN                                                   !3, <array>
   11     5        ASSIGN                                                   !4, 0
          6      > JMP                                                      ->18
   14     7    >   FETCH_DIM_R                                      ~10     !3, !4
          8        MOD                                              ~11     ~10, 2
          9        IS_EQUAL                                                 ~11, 0
         10      > JMPZ                                                     ~12, ->16
   16    11    >   PRE_INC                                                  !0
   17    12        FETCH_DIM_R                                      ~14     !3, !4
         13        ADD                                              ~15     !2, ~14
         14        ASSIGN                                                   !2, ~15
         15      > JMP                                                      ->17
   21    16    >   PRE_INC                                                  !1
   11    17    >   PRE_INC                                                  !4
         18    >   COUNT                                            ~19     !3
         19        IS_SMALLER                                               !4, ~19
         20      > JMPNZ                                                    ~20, ->7
   24    21    >   CONCAT                                           ~21     'Total+Even+Numbers%3A+', !0
         22        CONCAT                                           ~22     ~21, '%3C%2Fbr%3E'
         23        ECHO                                                     ~22
   25    24        CONCAT                                           ~23     'Total+Odd+Numbers%3A+', !1
         25        CONCAT                                           ~24     ~23, '%3C%2Fbr%3E'
         26        ECHO                                                     ~24
   26    27        ECHO                                                     !2
   31    28        ECHO                                                     '%09%3C%2Fbody%3E%0A%3C%2Fhtml%3E'
   32    29      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.45 ms | 1395 KiB | 13 Q