Bug #10467: static array doesn't evaluate defined keys
| From: | tbannister at mpathix dot com | Date: | Mon, 23 Apr 2001 21:19:50 +0000 |
| Subject: | Bug #10467: static array doesn't evaluate defined keys | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-52234@lists.php.net to get a copy of this message | ||
From: tbannister@mpathix.com
Operating system: Solaris
PHP version: 4.0.4pl1
PHP Bug Type: *General Issues
Bug description: static array doesn't evaluate defined keys
The following script doesn't work correctly. It should
print "My Message: Hello World\nArray ( [1] => Hello [2] =>
World )". Instead it prints "My Message: \nArray ( [FIRST]
=> Hello [SECOND] => World )".
<?
define("FIRST", 1);
define("SECOND", 2);
static $myArray = array(FIRST => "Hello", SECOND => "World");
print("My Message:". $myArray[FIRST] ." ".
$myArray[SECOND] ."<BR>\n");
print_r($myArray);
?>
--
Edit Bug report at: http://bugs.php.net/?id=10467&edit=1