RE: [PHP] Sessions, Is this behavior by design?
| From: | Johnson, Kirk | Date: | Tue, 21 Aug 2001 20:50:03 +0000 |
| Subject: | RE: [PHP] Sessions, Is this behavior by design? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-63769@lists.php.net to get a copy of this message | ||
> apparently, session_is_registered and isset return null if
> they evaluate to
> false. I was expecting boolean true and false return values,
What you were expecting is correct, boolean true/false. However, it appears
that PHP converts these values to strings during the echo. true converts to
the string 1, while a false string is the empty (null) string.
<?
$a = true;
echo "a is $a <br>";
$a = false;
echo "a is $a <br>";
?>
Kirk