ID: 9008
User Update by: [EMAIL PROTECTED]
Status: Duplicate
Bug Type: Class/Object related
Description: define()-ed values as assoc array keys don't work
D'oh!
Thanks.
Previous Comments:
---------------------------------------------------------------------------
[2001-01-31 15:46:45] [EMAIL PROTECTED]
See bug #8141.
---------------------------------------------------------------------------
[2001-01-30 14:44:12] [EMAIL PROTECTED]
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
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]