Home >Backend Development >PHP Tutorial >Parse == and === (double equal sign, triple equal sign) in php

Parse == and === (double equal sign, triple equal sign) in php

WBOY
WBOYOriginal
2016-07-25 08:57:111379browse
  1. if($config['urlrewrite']==1)
  2. or
  3. if($config['urlrewrite']==='1')
  4. to judge.
Copy code

Instructions: $a == $b;// Equal TRUE if $a is equal to $b. $a === $b;// Identical TRUE if $a is equal to $b, and they are of the same type. (introduced in PHP 4) means: == does not determine whether the two are of the same data type, while === is a more strict comparison. It not only requires that the two values ​​​​are equal, but also requires that their data types are also the same.



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