Re: post

From: Date: Thu, 13 Sep 2007 13:32:13 +0000
Subject: Re: post
References: 1  Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-58@lists.php.net to get a copy of this message
On 9/13/07, psycho <perfect.psycho@gmail.com> wrote: > Apparently I can't post in the forums because my IP address is > blocked. Would you please add this comment to > http://www.php.net/manual/en/language.types.integer.php ? I > think it > is very important for the other coders. > > There's one thing they didn't specify here and it seems to work > different when it comes to PHP and JavaScript. > Numbers starting with 0 are considered octal, therefore 010 is the > same as 8 (decimal). Strings are automatically converted to numbers > where needed. So here's the problem: > > In PHP => 1 + "010" = 11 > In PHP => 1 + ("0" . 10) = 11 > In JavaScript => 1 + "010" = 9 (may depend on browser?) This is fairly well explained at the top of the page with an example even. I don't see how javascript is relevant to the PHP documentation.. -Hannes

« previous php.webmaster (#58) next »