Justtechjobs.com Find a programming school near you






Online Campus Both


php-developer-list | 2000111

[PHP-DEV] PHP 4.0 Bug #7810 Updated: Wrong array-index interpretation From: kir <email protected>
Date: 11/14/00

ID: 7810
Updated by: kir
Reported By: bram <email protected>
Status: Closed
Bug Type: Arrays related
Assigned To:
Comments:

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';

Previous Comments:
---------------------------------------------------------------------------

[2000-11-14 10:15:30] bram <email protected>
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)

---------------------------------------------------------------------------

Full Bug description available at: http://bugs.php.net/?id=7810

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>