median() public static method

public static median ( array $numbers ) : float | mixed
$numbers array
return float | mixed
Example #1
0
 public function testMedianOnEvenLengthArray()
 {
     $numbers = [5, 2, 6, 1, 3, 4];
     $this->assertEquals(3.5, Mean::median($numbers));
 }