What's mean --- "==="

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ptth
Forum Newbie
Posts: 6
Joined: Fri Jul 12, 2002 7:20 am

What's mean --- "==="

Post by ptth »

three "="?

what is this?

who can tell me?
User avatar
hob_goblin
Forum Regular
Posts: 978
Joined: Sun Apr 28, 2002 9:53 pm
Contact:

Post by hob_goblin »

=== means "Is identical".
ptth
Forum Newbie
Posts: 6
Joined: Fri Jul 12, 2002 7:20 am

Thanks

Post by ptth »

i c


Thx
User avatar
AVATAr
Forum Regular
Posts: 524
Joined: Tue Jul 16, 2002 4:19 pm
Location: Uruguay -- Montevideo
Contact:

identical

Post by AVATAr »

identical, in type and value? :?:
User avatar
Takuma
Forum Regular
Posts: 931
Joined: Sun Aug 04, 2002 10:24 am
Location: UK
Contact:

Post by Takuma »

Yep... it is.

$string1 = 2;
$string2 = "2";

if($string1 === $string2) {
echo "There's something wron with this script";
} else {
echo "PHP'S got it right!";
}
ReDucTor
Forum Commoner
Posts: 90
Joined: Thu Aug 15, 2002 6:13 am

Post by ReDucTor »

in type and value.

e.g.
1 == "1" - true
1 == 1.0 - true
1 == 1 - true

1 === "1" - false
1 === 1.0 - false
1 === 1 - true
Post Reply