Re: Casting Weirdness - Possible PHP BUG?
| From: | Stefan Walk | Date: | Sat, 03 Apr 2004 00:39:05 +0000 |
| Subject: | Re: Casting Weirdness - Possible PHP BUG? | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-26980@lists.php.net to get a copy of this message | ||
On Fri, Apr 02, 2004 at 02:07:05PM -0800, Jeremiah J. Jacks wrote:
> I don't know why I'm getting weird results here. Maybe someone can shed some
> light?
> (Please see code below)
>
> On my box I am getting the following output:
> Invalid
> Valid
... which is perfectly normal, since a) the "normal" represenation of
numbers has no leading zeros and b) PHP considers any integer numberic
starting with 0 as an octal number. For example, 010 is equivalent to 8.
--
Regards,
Stefan Walk
<swalk@prp.physik.tu-darmstadt.de>