mirror of
https://github.com/php/php-src.git
synced 2024-10-17 22:42:38 +00:00
25 lines
371 B
Plaintext
25 lines
371 B
Plaintext
|
--TEST--
|
||
|
Bug #45742 Wrong class array inpretetion using constant indexes
|
||
|
--FILE--
|
||
|
<?php
|
||
|
class Constants {
|
||
|
// Needs to be equal
|
||
|
const A = 1;
|
||
|
const B = 1;
|
||
|
}
|
||
|
|
||
|
class ArrayProperty {
|
||
|
public static $array = array(
|
||
|
Constants::A => 23,
|
||
|
Constants::B => 42,
|
||
|
);
|
||
|
}
|
||
|
|
||
|
var_dump( ArrayProperty::$array );
|
||
|
?>
|
||
|
--EXPECT--
|
||
|
array(1) {
|
||
|
[1]=>
|
||
|
int(23)
|
||
|
}
|