PHP Operators: The === Operator
PHP’s === Operator enables you to compare or test variables for both equality and type. Refer below for example.
<?php //define variables.. $str = '9'; $int = 9; //Returns true since both variable contains the same value.. $res = ($str==$int); //Returns false since the two variables are not of the same type.. $res = ($str===$int); ?>
Tags: PHP, PHP Tutorials


Hi everyone im 






March 12th, 2009 at 10:13 pm
That’s actualy a pretty useful operator. You’d think that there’s not much you can do with that but in reality it has so many uses you wouldn’t belive it…
Domy Gryfino’s last blog post..Sprzedaż kawalerki w Gryfinie
Reply
March 14th, 2009 at 11:58 pm
Indeed this is a very useful PHP operator!
Reply
March 15th, 2009 at 9:05 pm
Thanks for pointing out the === operator. At first I thought you had a typo!
But, I see many uses for this! Keep up the good work with your tips and advice!
Free Games Gallery’s last blog post..Witchdance | Hexentanz
Reply
March 21st, 2009 at 5:22 pm
para ako nagbabasa ng php book ah.. astig.
GLenn’s last blog post..Nature Shine Wordpress Theme
Reply
April 8th, 2009 at 4:03 pm
Really nice presentation of operator ===.
I don’t know yet the enviroment of PHP but know some basic programming also like C.
Good Luck. Hopefully you could update your blog regularly.
Rein Valdez’s last blog post..Happy Reality and Facts
Reply
April 10th, 2009 at 4:10 pm
ang hirap intindihin nitong PHP. hehe. paturo naman jan
Reply
April 19th, 2009 at 12:24 am
I usually use the double equal sign == to test equality and never used this triple equal. Maybe because there’s no situation that requires it but thank you for pointing this one.
Reply
June 4th, 2009 at 9:09 pm
I always get lost when it comes to those “=” “==” “===” operators. Had no idea there even was a “===” one.
Hurtownia Tkanin’s last blog post..Jedwab
Reply