<?php
//Let's find the characters that are not used in the sentence
$string = "Hello friends";
echo count_chars($string,4);
?>
<?php
//Let's find the characters used in the sentence
$string = "Hello friends";
echo count_chars($string,3);
?>
The PHP count_chars () function has mode values of 0,1,2,3,4. 3 and 4 modes are commonly used.