summaryrefslogtreecommitdiff
path: root/Zend/tests
diff options
context:
space:
mode:
authorBob Weinand <bobwei9@hotmail.com>2014-04-11 10:06:17 +0200
committerBob Weinand <bobwei9@hotmail.com>2014-04-11 10:08:44 +0200
commitf614fc68984b2d7fce3f275b8106955b5d910472 (patch)
tree10c98c57643c60af4d1ae6a56b7112fb274a65ed /Zend/tests
parentd3f390a26888eefd012b4634137318797965ea86 (diff)
downloadphp-git-f614fc68984b2d7fce3f275b8106955b5d910472.tar.gz
Fix bug #66015 by reverting "Removed operations on constant arrays."
Diffstat (limited to 'Zend/tests')
-rw-r--r--Zend/tests/bug66015.phpt32
-rw-r--r--Zend/tests/errmsg_040.phpt2
-rw-r--r--Zend/tests/ns_059.phpt2
3 files changed, 36 insertions, 0 deletions
diff --git a/Zend/tests/bug66015.phpt b/Zend/tests/bug66015.phpt
new file mode 100644
index 0000000000..f1cbd37aec
--- /dev/null
+++ b/Zend/tests/bug66015.phpt
@@ -0,0 +1,32 @@
+--TEST--
+Bug #66015 (wrong array indexing in class's static property)
+--FILE--
+<?php
+class Test
+{
+ const FIRST = 1;
+ const SECOND = 2;
+ const THIRD = 3;
+
+ protected static $array = [
+ self::FIRST => 'first',
+ 'second',
+ 'third'
+ ];
+
+ public function __construct()
+ {
+ var_export(self::$array);
+ }
+}
+
+$test = new Test();
+?>
+===DONE===
+--EXPECTF--
+array (
+ 1 => 'first',
+ 2 => 'second',
+ 3 => 'third',
+)
+===DONE===
diff --git a/Zend/tests/errmsg_040.phpt b/Zend/tests/errmsg_040.phpt
index f3d0afcf0a..2b192d0b83 100644
--- a/Zend/tests/errmsg_040.phpt
+++ b/Zend/tests/errmsg_040.phpt
@@ -1,5 +1,7 @@
--TEST--
errmsg: arrays are not allowed in class constants
+--XFAIL--
+Actually it's hard to test where the array comes from (property, constant, ...)
--FILE--
<?php
diff --git a/Zend/tests/ns_059.phpt b/Zend/tests/ns_059.phpt
index ea66037b43..b9fcfee5c0 100644
--- a/Zend/tests/ns_059.phpt
+++ b/Zend/tests/ns_059.phpt
@@ -1,5 +1,7 @@
--TEST--
059: Constant arrays
+--XFAIL--
+Actually it's hard to test where the array comes from (property, constant, ...)
--FILE--
<?php
const C = array();