note 89049 deleted from language.operators.comparison by danbrown
| From: | danbrown@php.net | Date: | Thu, 19 Feb 2009 13:36:53 +0000 |
| Subject: | note 89049 deleted from language.operators.comparison by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-150853@lists.php.net to get a copy of this message | ||
Note Submitter: mathias at wewezer dot de
----
$k = 0;
if( $k == "" )
{
echo $k . ' is a empty string';
}
else
{
echo $k . ' is <b>no</b> empty string';
}
Result: 0 is a empty string
$k = 0;
if( (string)$k == "" )
{
echo $k . ' is a empty string';
}
else
{
echo $k . ' is <b>no</b> empty string';
}
Result: 0 is <b>no</b> empty string
$k = 0;
if( $k === "" )
{
echo $k . ' is a empty string';
}
else
{
echo $k . ' is <b>no</b> empty string';
}
Result: 0 is <b>no</b> empty string