php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18921 integer values 08, 09 convert to string as 0
Submitted: 2002-08-15 13:54 UTC Modified: 2002-08-15 13:59 UTC
From: ben at parcelrecords dot com Assigned:
Status: Not a bug Package: Strings related
PHP Version: 4.2.2 OS: Windows 2000
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: ben at parcelrecords dot com
New email:
PHP Version: OS:

 

 [2002-08-15 13:54 UTC] ben at parcelrecords dot com
Ok,
<? echo 01, 02, 03, 04, 05, 06, 07, 08, 09, 10; ?>
prints
12345670010
instead of
12345678910

8 and 9 are now zeroes

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-08-15 13:59 UTC] zeev@php.net
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

integers that begin with leading zeros are treated as octal numbers.  Since 08 and 09 contain digits which are invalid in the octal base, they're reduced to zeros.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 14:01:32 2024 UTC