Bug #9008 Updated: define()-ed values as assoc array keys don't work
| From: | sniper@php.net | Date: | Fri, 11 May 2001 23:43:26 +0000 |
| Subject: | 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-54920@lists.php.net to get a copy of this message | ||
ID: 9008
Updated by: sniper
Reported By: colin@easydns.com
Old-Status: Duplicate
Status: Closed
Bug Type: Class/Object related
Operating system:
PHP Version: 4.0 Latest CVS (30/01/2001)
Assigned To:
Comments:
Previous Comments:
---------------------------------------------------------------------------
[2001-01-31 15:46:45] torben@php.net
See bug #8141.
---------------------------------------------------------------------------
[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?
---------------------------------------------------------------------------
ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=9008&edit=2