Re: Casting nulls
| From: | Gerard Samuel | Date: | Wed, 24 Sep 2003 23:10:39 +0000 |
| Subject: | Re: Casting nulls | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-163824@lists.php.net to get a copy of this message | ||
If I understood the question wouldn't this work???
if (!is_null($int) && $int < 1)
{
// do some foobar
}
Carl Furst wrote:
IF $int is null and I have a test If($int < 1) { //do some foobar } will $int be evaluated as a zero? IF I cast (int) $int.. will that turn a null $int into a zero?? Documentation aint too clear. Thanks, Carl.