RE: [PHP] the triple equal sign?
| From: | Jochen Kaechelin | Date: | Mon, 16 Jul 2001 11:20:06 +0000 |
| Subject: | RE: [PHP] the triple equal sign? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-58034@lists.php.net to get a copy of this message | ||
> What is the '===' ?
>
You can not only compare if the content of two variables
is the same ($a == $b) - you can also compare the type (integer, float...)
$a = 1;
$b = 1;
$a == $b -> TRUE
$a = "1";
$b = 1;
$a === $b -> FALSE because $a is a STRING and $b is a INTEGER!
--
phpArbeitsgruppe in Gruendung - Jochen Kaechelin
Stuttgarter Str.3, D-73033 Goeppingen
Tel. 07161-92 95 94, Fax 07161-92 95 98
http://www.php-arbeitsgruppe.de,
mailto:info@php-arbeitsgruppe.de