xref: /PHP-8.2/Zend/tests/bug45742.phpt (revision d7a3edd4)
1--TEST--
2Bug #45742 Wrong class array inpretetion using constant indexes
3--FILE--
4<?php
5class Constants {
6    // Needs to be equal
7    const A = 1;
8    const B = 1;
9}
10
11class ArrayProperty {
12    public static $array = array(
13        Constants::A => 23,
14        Constants::B => 42,
15    );
16}
17
18var_dump( ArrayProperty::$array );
19?>
20--EXPECT--
21array(1) {
22  [1]=>
23  int(42)
24}
25