3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $myArray = array('C140 ',' C100 ',' C140 ',' C141 ',' C141 ',' C100 ',' C141 ',' C141 ', ' U103 ',' Q111 ',' C100 ',' U104 ',' C141 ',' C141 ',' C141 ', ' C123 ',' C101 ',' U103 ',' U103 ',' U103 ',' U103 ',' U103 ',' Rt104' ,'D139 ',' C141'); Var_dump(array_count_values($myArray));
Output for 5.6.0 - 5.6.30, hhvm-3.18.4 - 3.21.0, 7.0.0 - 7.3.0beta1
array(12) { ["C140 "]=> int(1) [" C100 "]=> int(3) [" C140 "]=> int(1) [" C141 "]=> int(7) [" U103 "]=> int(6) [" Q111 "]=> int(1) [" U104 "]=> int(1) [" C123 "]=> int(1) [" C101 "]=> int(1) [" Rt104"]=> int(1) ["D139 "]=> int(1) [" C141"]=> int(1) }