Skip to content
forked from mazedlx/median

Super simple PHP library for getting the median of array values (also returns the avg of the array

Notifications You must be signed in to change notification settings

leonsegal/median

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

median

Super simple PHP library for getting the median of array values (cn also calc the average of the array's elements).

Installation and Usage

composer install mazedlx/median

$arrayOfValues = [1, 2, 5, 1000, 7]
$m = new Median($arrayOfValues);

$avh = $m->average();
// $avh == 203

$median = $m->median();
// $median == 5

About

Super simple PHP library for getting the median of array values (also returns the avg of the array

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%