xref: /PHP-8.4/Zend/tests/bug66015.phpt (revision 7aacc705)
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--EXPECT--
27array (
28  1 => 'first',
29  2 => 'second',
30  3 => 'third',
31  4 => 4,
32)
33