PHP 4.0 Bug #8403 Updated: Number Parsing error
| From: | anil at recoil dot org | Date: | Sun, 24 Dec 2000 16:07:50 +0000 |
| Subject: | PHP 4.0 Bug #8403 Updated: Number Parsing error | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-42220@lists.php.net to get a copy of this message | ||
ID: 8403
User Update by: anil@recoil.org
Old-Status: Open
Status: Closed
Bug Type: Scripting Engine problem
Description: Number Parsing error
And ... doh! Pretty much any other number would have shown
that it's octal syntax.
<?
$a = 070;
var_dump($a);
$b = 70;
var_dump($b);
?>
int(56)
int(70)
thanks sascha :)
Previous Comments:
---------------------------------------------------------------------------
[2000-12-24 10:35:48] anil@recoil.org
A friend pointed this out, and it really does seem wierd.
This script:
<?
$a = 090;
var_dump($a);
$b = 90;
var_dump($b);
?>
Produces the following output:
int(0)
int(90)
Why is '090' getting parsed to int(0), when it should
be int(90) ?
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=8403