File size: 373 Bytes
1e94262
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
--TEST--
Bug #45742 Wrong class array interpretation 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(42)
}