From: [EMAIL PROTECTED]
Operating system: linux
PHP version: 4.0.4pl1
PHP Bug Type: Scripting Engine problem
Bug description: constants behave weird in static hash arrays
I think the following piece of code behaves sort of weird:
<?
define ('A', 1);
function test()
{
$a = array(1 => true);
static $stat_a = array(A => true);
var_dump($a);
var_dump($stat_a);
}
test();
?>
result is:
array(1) {
[1]=>
bool(true)
}
array(1) {
["A"]=>
bool(true)
}
I'm not sure whether static variables are supposed to evaluate expressions
but even if they were not, the engine should at least issue a warning.
--
Edit bug report at: http://bugs.php.net/?id=13138&edit=1
--
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]