I'm looking for a way to count the number of occurrences in a string, I find 2 php function to do this:
I try to understand what is the difference between this 2 functions.
The major difference i saw is that substr_count is case sensitive, But i didn't understand about count_chars the following statement:
Counts the number of occurrences of every byte-value (0..255) in string and returns it in various ways.
If anyone can please explain the major differences between this 2 functions, Maybe some example can help.