summaryrefslogtreecommitdiff
path: root/Zend/tests/bug45910.phpt
diff options
context:
space:
mode:
authorFelipe Pena <felipe@php.net>2008-08-25 19:35:10 +0000
committerFelipe Pena <felipe@php.net>2008-08-25 19:35:10 +0000
commit5fb9a8e794a6ae5f802e6218f44d9bcb5183a8b2 (patch)
tree4c62a18412e30bee5d00575459013fd5f02947d8 /Zend/tests/bug45910.phpt
parentc66533a789aa5be5fbbd553d3145fd668a80eb47 (diff)
downloadphp-git-5fb9a8e794a6ae5f802e6218f44d9bcb5183a8b2.tar.gz
- New tests
Diffstat (limited to 'Zend/tests/bug45910.phpt')
-rw-r--r--Zend/tests/bug45910.phpt28
1 files changed, 28 insertions, 0 deletions
diff --git a/Zend/tests/bug45910.phpt b/Zend/tests/bug45910.phpt
new file mode 100644
index 0000000000..1041877fee
--- /dev/null
+++ b/Zend/tests/bug45910.phpt
@@ -0,0 +1,28 @@
+--TEST--
+Bug #45910 (Cannot declare self-referencing constant)
+--FILE--
+<?php
+
+class foo {
+ const AAA = 'x';
+ const BBB = 'a';
+ const CCC = 'a';
+ const DDD = self::AAA;
+
+ private static $foo = array(
+ self::BBB => 'a',
+ self::CCC => 'b',
+ self::DDD => self::AAA
+ );
+
+ public static function test() {
+ self::$foo;
+ }
+}
+
+foo::test();
+
+print 1;
+?>
+--EXPECT--
+1