mirror of
https://github.com/php/php-src.git
synced 2024-11-27 20:03:40 +08:00
31 lines
389 B
PHP
31 lines
389 B
PHP
--TEST--
|
|
Bug #30862 (Static array with boolean indexes)
|
|
--FILE--
|
|
<?php
|
|
class T {
|
|
static $a = array(false=>"false", true=>"true");
|
|
}
|
|
print_r(T::$a);
|
|
?>
|
|
----------
|
|
<?php
|
|
define("X",0);
|
|
define("Y",1);
|
|
class T2 {
|
|
static $a = array(X=>"false", Y=>"true");
|
|
}
|
|
print_r(T2::$a);
|
|
?>
|
|
--EXPECT--
|
|
Array
|
|
(
|
|
[0] => false
|
|
[1] => true
|
|
)
|
|
----------
|
|
Array
|
|
(
|
|
[0] => false
|
|
[1] => true
|
|
)
|