xref: /PHP-8.2/tests/lang/bug30862.phpt (revision f8d79582)
1--TEST--
2Bug #30862 (Static array with boolean indexes)
3--FILE--
4<?php
5class T {
6    static $a = array(false=>"false", true=>"true");
7}
8print_r(T::$a);
9?>
10----------
11<?php
12define("X",0);
13define("Y",1);
14class T2 {
15    static $a = array(X=>"false", Y=>"true");
16}
17print_r(T2::$a);
18?>
19--EXPECT--
20Array
21(
22    [0] => false
23    [1] => true
24)
25----------
26Array
27(
28    [0] => false
29    [1] => true
30)
31