3v4l.org

run code in 300+ PHP versions simultaneously
<?php $A = array(9,4,-3,-10); function solution($A) { $average = array_sum($A) / count($A); print $average; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5BYcY
function name:  (null)
number of ops:  2
compiled vars:  !0 = $A
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    7     1      > RETURN                                                   1

Function solution:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5BYcY
function name:  solution
number of ops:  9
compiled vars:  !0 = $A, !1 = $average
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1        INIT_FCALL                                               'array_sum'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $2      
          4        COUNT                                            ~3      !0
          5        DIV                                              ~4      $2, ~3
          6        ASSIGN                                                   !1, ~4
    6     7        ECHO                                                     !1
    7     8      > RETURN                                                   null

End of function solution

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.94 ms | 1394 KiB | 15 Q