3v4l.org

run code in 300+ PHP versions simultaneously
<?php $month_temp = "78, 60, 62, 68, 71, 68, 73, 85, 66, 64, 76, 63, 81, 76, 73, 68, 72, 73, 75, 65, 74, 63, 67, 65, 64, 68, 73, 75, 79, 73"; $temp_array = explode(',', $month_temp); $tot_temp = 0; $temp_array_length = count($temp_array); foreach($temp_array as $temp) { $tot_temp += $temp; } $avg_high_temp = $tot_temp/$temp_array_length; echo "Average Temperature is : ".$avg_high_temp."<br>"; sort($temp_array); echo "<br> List of seven lowest temperatures : "; for ($i=0; $i<5; $i++) { echo $temp_array[$i].", "; } echo "<br>List of seven highest temperatures : "; for ($i=($temp_array_length-5); $i<($temp_array_length); $i++) { echo $temp_array[$i].", "; } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 10, Position 2 = 13
Branch analysis from position: 10
2 jumps found. (Code = 78) Position 1 = 11, Position 2 = 13
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 29
Branch analysis from position: 29
2 jumps found. (Code = 44) Position 1 = 31, Position 2 = 25
Branch analysis from position: 31
1 jumps found. (Code = 42) Position 1 = 39
Branch analysis from position: 39
2 jumps found. (Code = 44) Position 1 = 41, Position 2 = 35
Branch analysis from position: 41
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 35
2 jumps found. (Code = 44) Position 1 = 41, Position 2 = 35
Branch analysis from position: 41
Branch analysis from position: 35
Branch analysis from position: 25
2 jumps found. (Code = 44) Position 1 = 31, Position 2 = 25
Branch analysis from position: 31
Branch analysis from position: 25
Branch analysis from position: 13
filename:       /in/HOIQP
function name:  (null)
number of ops:  42
compiled vars:  !0 = $month_temp, !1 = $temp_array, !2 = $tot_temp, !3 = $temp_array_length, !4 = $temp, !5 = $avg_high_temp, !6 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '78%2C+60%2C+62%2C+68%2C+71%2C+68%2C+73%2C+85%2C+66%2C+64%2C+76%2C+63%2C+81%2C+76%2C+73%2C++%0A68%2C+72%2C+73%2C+75%2C+65%2C+74%2C+63%2C+67%2C+65%2C+64%2C+68%2C+73%2C+75%2C+79%2C+73'
    4     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '%2C'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $8      
          5        ASSIGN                                                   !1, $8
    5     6        ASSIGN                                                   !2, 0
    6     7        COUNT                                            ~11     !1
          8        ASSIGN                                                   !3, ~11
    7     9      > FE_RESET_R                                       $13     !1, ->13
         10    > > FE_FETCH_R                                               $13, !4, ->13
    9    11    >   ASSIGN_OP                                     1          !2, !4
    7    12      > JMP                                                      ->10
         13    >   FE_FREE                                                  $13
   11    14        DIV                                              ~15     !2, !3
         15        ASSIGN                                                   !5, ~15
   12    16        CONCAT                                           ~17     'Average+Temperature+is+%3A+', !5
         17        CONCAT                                           ~18     ~17, '%3Cbr%3E'
         18        ECHO                                                     ~18
   14    19        INIT_FCALL                                               'sort'
         20        SEND_REF                                                 !1
         21        DO_ICALL                                                 
   15    22        ECHO                                                     '%3Cbr%3E+List+of+seven+lowest+temperatures+%3A+'
   16    23        ASSIGN                                                   !6, 0
         24      > JMP                                                      ->29
   18    25    >   FETCH_DIM_R                                      ~21     !1, !6
         26        CONCAT                                           ~22     ~21, '%2C+'
         27        ECHO                                                     ~22
   16    28        PRE_INC                                                  !6
         29    >   IS_SMALLER                                               !6, 5
         30      > JMPNZ                                                    ~24, ->25
   21    31    >   ECHO                                                     '%3Cbr%3EList+of+seven+highest+temperatures+%3A+'
   22    32        SUB                                              ~25     !3, 5
         33        ASSIGN                                                   !6, ~25
         34      > JMP                                                      ->39
   24    35    >   FETCH_DIM_R                                      ~27     !1, !6
         36        CONCAT                                           ~28     ~27, '%2C+'
         37        ECHO                                                     ~28
   22    38        PRE_INC                                                  !6
         39    >   IS_SMALLER                                               !6, !3
         40      > JMPNZ                                                    ~30, ->35
   26    41    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.52 ms | 1400 KiB | 17 Q