In PHP, "!==" is not exactly equal, also called the absolute not equal operator. When the values on both sides of the operator are not the same or the types are not the same, the returned result is "true", otherwise it returns "false" ", the syntax is "x !== y".
The operating environment of this article: Windows 10 system, PHP version 7.1, Dell G3 computer.
Absolutely not equal If x is not equal to y, or their types are not the same, then return true
5!= ="5" returns true
The equal to operation process is as follows:
1. Determine whether the data types of the two sides of the equal to operator are the same. If they are not the same, return false
2. Determine whether the values of the two sides of the equal operator are equal. If they are not equal, return false
3. Finally, perform the AND operation of the above two steps. Returns the result of the AND operation.
The operation process of not equal to equal (!==) is exactly the opposite of equal to equal:
1. Determine whether the data types of the two sides of the not equal to equal operator are the same. If they are not the same, return true
2. Determine whether the values of the two sides of the not equal to operator are equal. If they are not equal, return true
3. Finally, perform the OR operation of the above 2 steps. Returns the result of an OR operation.
The example is as follows:
"; ?>
Output result:
Recommended learning: "PHP Video Tutorial"
The above is the detailed content of What is the usage of !== not equal in php?. For more information, please follow other related articles on the PHP Chinese website!