NOTE: This function can only count array values that are type of STRING of INTEGER.
public countValues ( ) : |
||
return | An ArrayObject containing the array values as keys and number of their occurrences as values. |
/** * @dataProvider arraySet2 */ public function testCountValues($array) { $a = new ArrayObject($array); $valueCount = $a->countValues(); $this->assertSame(array_count_values($array), $valueCount->val()); }