php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #7810 Wrong array-index interpretation
Submitted: 2000-11-14 10:15 UTC Modified: 2000-11-14 10:21 UTC
From: bram at famvanleur dot myweb dot nl Assigned:
Status: Closed Package: Arrays related
PHP Version: 4.0.2 OS: Windows 98
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: bram at famvanleur dot myweb dot nl
New email:
PHP Version: OS:

 

 [2000-11-14 10:15 UTC] bram at famvanleur dot myweb dot nl
The following script acts strange (no crash :).
<?
$some[1] = "ONE";
$some[02] = "TWO";
$some[07] = "SEVEN";
$some[08] = "EIGHT";
$some[09] = "NINE";
Print $some[1];
Print $some[2];
Print $some[7];
Print $some[8];
Print $some[09];
?>
I can't realy understand why $some[7] is correctly interpreted and $some[8] isn't. (in other words. Print $some[7] shows SEVEN and Print $some[8] doesn't print anything at all.

I would be really pleased if you could respond in anyway about this thingy.

Greets,
 Bram van Leur (NL)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-11-14 10:21 UTC] kir@php.net
When you put '0' before a number, you mean that this number is
octal. Indeed, 010 == 8, 011 == 9, 07 == 7.
08, 09 aren't defined.

echo 08;
echo 09;

both prints '0';

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 14:01:32 2024 UTC