Re: Casting nulls
| From: | Curt Zirzow | Date: | Wed, 24 Sep 2003 23:39:29 +0000 |
| Subject: | Re: Casting nulls | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-163827@lists.php.net to get a copy of this message | ||
* Thus wrote Carl Furst (carl@vote.com):
> 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??
<?php
echo (int) null;
?>
0
Curt
--
"I used to think I was indecisive, but now I'm not so sure."