#26951 [Opn->Bgs]: INT issue, passing 08 results in 0
| From: | helly@php.net | Date: | Sun, 18 Jan 2004 10:31:45 +0000 |
| Subject: | #26951 [Opn->Bgs]: INT issue, passing 08 results in 0 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-53513@lists.php.net to get a copy of this message | ||
ID: 26951
Updated by: helly@php.net
Reported By: jake at presstec dot net
-Status: Open
+Status: Bogus
Bug Type: *Programming Data Structures
Operating System: Linux 2.4.
PHP Version: 4.3.4
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
Ocalt restrictions
Previous Comments:
------------------------------------------------------------------------
[2004-01-17 21:52:25] pluggz24 at yahoo dot com
This isn't a bug; this is proper behavior for an octal integer. 08 and
09 are both undefined, as an octal value can have digits 0-7 :/
I don't see this as being a bug.
------------------------------------------------------------------------
[2004-01-17 21:33:20] jake at presstec dot net
Description:
------------
This is very simple too understand from the example code,passing 08 or
09 results in 0.....
Errr umm... what the?!
Thanks
Reproduce code:
---------------
<?php
function p($val)
{
echo "$val<br/>";
}
p(01);
p(05);
p(08);
p(09);
?>
Expected result:
----------------
1<br/>5<br/>8<br/>9<br/>
Actual result:
--------------
1<br/>5<br/>0<br/>0<br/>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=26951&edit=1