3v4l.org

run code in 300+ PHP versions simultaneously
<?php $TestResult = [ 'Smith' => ['98', '100', '78', '91'], 'Johnson' => ['67', '85', '92', '88'] ]; $Total = array_sum($TestResult['Smith']); $Average = $Total/count($TestResult['Smith']); echo $Average;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/U3gCA
function name:  (null)
number of ops:  12
compiled vars:  !0 = $TestResult, !1 = $Total, !2 = $Average
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    8     1        INIT_FCALL                                               'array_sum'
          2        FETCH_DIM_R                                      ~4      !0, 'Smith'
          3        SEND_VAL                                                 ~4
          4        DO_ICALL                                         $5      
          5        ASSIGN                                                   !1, $5
    9     6        FETCH_DIM_R                                      ~7      !0, 'Smith'
          7        COUNT                                            ~8      ~7
          8        DIV                                              ~9      !1, ~8
          9        ASSIGN                                                   !2, ~9
   11    10        ECHO                                                     !2
   12    11      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
239.61 ms | 1000 KiB | 14 Q