3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $array = array(12,43,66,21,56,43,43,78,78,100,43,43,43,21); $vals = array_count_values($array); echo 'No. of NON Duplicate Items: '.count($vals).'<br><br>'; print_r($vals);
based on DQI2K
Output for 4.3.0 - 7.1.0
No. of NON Duplicate Items: 7<br><br>Array ( [12] => 1 [43] => 6 [66] => 1 [21] => 2 [56] => 1 [78] => 2 [100] => 1 )