PHP Operators: The === Operator
Posted by Daniel at 2:17 am
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); ?>
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