The === operator in PHP is used to compare whether the values and types of two expressions are exactly equal. It returns true if both values and types are equal, otherwise it returns false.
=== operator in PHP
In PHP, ===## The # operator is a strict equality operator that compares the values and types of two expressions.
Usage:
=== operator is used to check whether the values and types of two expressions are completely equal. Returns true if and only if both expressions are equal in value and type. Otherwise, returns false.Grammar:
<code class="php">$result = ($expression1 === $expression2);</code>
Example:
<code class="php">$a = 10; $b = 10; $c = "10"; var_dump($a === $b); // true var_dump($b === $c); // false var_dump($c === $a); // false</code>
Note:
The above is the detailed content of What does === mean in php. For more information, please follow other related articles on the PHP Chinese website!