I have 2 array, I want to compare them by matched values and order and count of total eligible values.
$a = [A,B,C,D,E,F,G];
| | |
$b = [B,A,C,D,F,E,G];
In this case the output should be 3 . How can I achieve this with top performance?
Update:
I am not asking matched values only , values should matched at the same order as well.