PHP 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);
?>

affiliate_link
Share this Post:
Digg Google Bookmarks reddit Mixx StumbleUpon Technorati Yahoo! Buzz DesignFloat Delicious BlinkList Furl

Comments are closed.