Home  >  Article  >  Backend Development  >  What do the three equal signs "===" in php mean?

What do the three equal signs "===" in php mean?

WBOY
WBOYOriginal
2021-12-02 10:38:427152browse

"===" in php means "absolute equal" or "constant equal to". It is a comparison operator of PHP; when using the "===" operator, the two compared If the variable values ​​are equal and the types are the same, the returned result is "true", otherwise "false" is returned, and the syntax is "$x===$y".

What do the three equal signs

The operating environment of this tutorial: windows7 system, PHP7.1 version, DELL G3 computer

Three of the php What does the equal sign "===" mean

The three equal signs in PHP mean absolute equality. If x is equal to y and they are of the same type, true is returned. It is a type of PHP comparison operator.

Requires that the given left and right variables must be completely equal. For example, the following one compares strings and integers:

What do the three equal signs === in php mean?

Output result: different data types or values.

===: Complete equal operation, not only compares the value, but also compares the type of the value. It is true only if the two are consistent.

If you are interested, you can click on "PHP Video Tutorial" to learn more about PHP knowledge.

The above is the detailed content of What do the three equal signs "===" in php mean?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn