I'm just wondering what's going on here. If I use this:
var_dump(similar_text('abcd', 'abcdefg', $percent)); //output: int 4
Ok, abcd in the right place, so 4 is a good result.
At the beginning of the first option, change a and b :
var_dump(similar_text('bacd', 'abcdefg', $percent)); //output: int 3
I tried to 2 or 4 , but not 3 . Can someone explain this to me why?
source share