php-src/tests/lang/bug23524.phpt

30 lines
340 B
Plaintext
Raw Normal View History

2003-12-22 22:53:48 +00:00
--TEST--
2007-05-07 17:23:53 +00:00
Bug #23524 (Improper handling of constants in array indices)
2003-12-22 22:53:48 +00:00
--FILE--
<?php
echo "Begin\n";
define("THE_CONST",123);
function f($a=array(THE_CONST=>THE_CONST)) {
print_r($a);
}
f();
f();
f();
echo "Done";
?>
--EXPECT--
Begin
Array
(
[123] => 123
)
Array
(
[123] => 123
)
Array
(
[123] => 123
)
Done