xref: /PHP-7.4/Zend/tests/bug66015.phpt (revision ded3d984)
1--TEST--
2Bug #66015 (wrong array indexing in class's static property)
3--FILE--
4<?php
5class Test
6{
7   const FIRST = 1;
8   const SECOND = 2;
9   const THIRD = 3;
10
11   protected static $array = [
12       self::FIRST => 'first',
13       'second',
14       'third',
15       4,
16   ];
17
18   public function __construct()
19   {
20       var_export(self::$array);
21   }
22}
23
24$test = new Test();
25?>
26
27===DONE===
28--EXPECT--
29array (
30  1 => 'first',
31  2 => 'second',
32  3 => 'third',
33  4 => 4,
34)
35===DONE===
36