summaryrefslogtreecommitdiff
path: root/tests/lang/bug30862.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lang/bug30862.phpt')
-rw-r--r--tests/lang/bug30862.phpt30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/lang/bug30862.phpt b/tests/lang/bug30862.phpt
new file mode 100644
index 0000000..12c95d5
--- /dev/null
+++ b/tests/lang/bug30862.phpt
@@ -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
+)