fork(19) download
  1. <?php
  2. $a[] = '56';
  3. $a[] = '66';
  4. $a[] = '';
  5. $a[] = '58';
  6. $a[] = '85';
  7. $a[] = '';
  8. $a[] = '';
  9. $a[] = '76';
  10. $a[] = '';
  11. $a[] = '57';
  12. if(count($a)) {
  13. $a = array_filter($a);
  14. echo $average = array_sum($a)/count($a);
  15. }
Success #stdin #stdout 0.02s 23416KB
stdin
Standard input is empty
stdout
66.333333333333