The most common way to compare the equality of two strings is to use "= = =" To determine the difference between it and "= =", in short, the former emphasizes the "identical" type also requires the same, the latter requires "Equal", the value of the same can be.
Or use strcmp to judge, but this can tell you whether the two strings are equal, but can't tell you where the difference is.
My idea is that a single string is divided into letters (character) so that comparisons can be made to know exactly where they are.
Delimited string, using "Str_split" on it, Syntax reference "2". Then output an array of results, the advantage is that even a space will be an element of the array. My previous example is because the previous string contains 2 spaces, and the second one is only one. But the output will see the same display.
You can also split by other separators, such as "explode" or "preg_split", referring to "3" and "4". The former uses a simple split number, which uses regular expressions. "Split" has been abolished (deprecated).
Another useful function is "str_word_count", which splits the string into arrays and clears the numbers and punctuation marks. If you want to count how often words appear, you can use "array_count_values",