<?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 7.0.0 - 7.0.20, 7.1.0 - 7.1.20, 7.2.6 - 7.2.33, 7.3.16 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.4, 8.3.6
- 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)
}
- Output for 8.3.5
- Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
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)
}
preferences:
186.01 ms | 402 KiB | 172 Q