mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
- Added test case for bug #30862.
This commit is contained in:
parent
82cd4789a7
commit
a07c080ce8
1 changed files with 30 additions and 0 deletions
30
tests/lang/bug30862.phpt
Normal file
30
tests/lang/bug30862.phpt
Normal file
|
@ -0,0 +1,30 @@
|
|||
--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
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue