mirror of
https://github.com/php/php-src.git
synced 2024-10-21 00:12:34 +00:00
30 lines
338 B
Plaintext
30 lines
338 B
Plaintext
|
--TEST--
|
||
|
Bug #23524 Improper handling of constants in array indeces
|
||
|
--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
|