static bool equals(string $knownString, string $userInput)
Compares two strings.
This method implements a constant-time algorithm to compare strings. Regardless of the used implementation, it will leak length information.
static bool equals(string $knownString, string $userInput)
Compares two strings.
This method implements a constant-time algorithm to compare strings. Regardless of the used implementation, it will leak length information.
string | $knownString | The string of known length to compare against |
string | $userInput | The string that the user can control |
bool | true if the two strings are the same, false otherwise |
Designed by : w10schools
service@w10schools.com
Please login to continue.