php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16497 Improper Numeric Conversion (08, 09)
Submitted: 2002-04-08 12:51 UTC Modified: 2002-04-08 12:53 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: ws13461 at aod dot fedex dot com Assigned:
Status: Not a bug Package: Variables related
PHP Version: 4.1.2 OS: Linux 7.2
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: ws13461 at aod dot fedex dot com
New email:
PHP Version: OS:

 

 [2002-04-08 12:51 UTC] ws13461 at aod dot fedex dot com
I ran across this problem in an array assignment, but it is reproducible with any variable assignment.  PHP doesn't convert the following numeric assignments correctly.

$a = 06;
$b = 07;
$c = 08;
$d = 09;
$e = 10;

print $a;   // prints 6
print $b;   // prints 7
print $c;   // prints 0
print $d;   // prints 0
print $e;   // prints 10

Thanks,
Bill Scheffer
FedEx Express
(901) 224-4342
ws13461@aod.fedex.com

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-04-08 12:53 UTC] derick@php.net
08 and 09 are octal numbers, please refer to: http://www.php.net/manual/en/language.types.integer.php for more information.

Derick
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 03:01:28 2024 UTC