PHP 4.0 Bug #9008 Updated: define()-ed values as assoc array keys don't work
| From: | torben@php.net | Date: | Wed, 31 Jan 2001 20:46:45 +0000 |
| Subject: | PHP 4.0 Bug #9008 Updated: define()-ed values as assoc array keys don't work | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-45488@lists.php.net to get a copy of this message | ||
ID: 9008
Updated by: torben
Reported By: colin@easydns.com
Old-Status: Open
Status: Duplicate
Bug Type: Class/Object related
Assigned To:
Comments:
See bug #8141.
Previous Comments:
---------------------------------------------------------------------------
[2001-01-30 14:44:12] colin@easydns.com
Take this script:
<?php
define(TEST_VAR, 100 );
class test_class {
var $codes = array(
TEST_VAR => "hello"
);
}
$x = new test_class;
print_r($x->codes);
?>
This outputs:
Array
(
[TEST_VAR] => hello
)
whereas I figure it should output:
Array
(
[100] => hello
)
No?
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=9008