summaryrefslogtreecommitdiff
path: root/Zend/tests/bug70997.phpt
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2015-11-30 16:52:57 +0300
committerDmitry Stogov <dmitry@zend.com>2015-11-30 16:52:57 +0300
commit25c5d185fcece7620f4b1790fd705999757f3b2f (patch)
treea664df96b9ae4d71ca2bf0e55f3f2cabf2376ee2 /Zend/tests/bug70997.phpt
parent5df6f9f20ee571caf30c005fc2eae5eb780ba002 (diff)
downloadphp-git-25c5d185fcece7620f4b1790fd705999757f3b2f.tar.gz
Fixed bug #70997 (When using parentClass:: instead of parent::, static context changed)
Diffstat (limited to 'Zend/tests/bug70997.phpt')
-rw-r--r--Zend/tests/bug70997.phpt26
1 files changed, 26 insertions, 0 deletions
diff --git a/Zend/tests/bug70997.phpt b/Zend/tests/bug70997.phpt
new file mode 100644
index 0000000000..bdb3377c74
--- /dev/null
+++ b/Zend/tests/bug70997.phpt
@@ -0,0 +1,26 @@
+--TEST--
+Bug #70997 (When using parentClass:: instead of parent::, static context changed)
+--FILE--
+<?php
+class A {
+ const TEST = false;
+
+ public function test()
+ {
+ var_dump(static::TEST);
+ }
+}
+
+class B extends A {
+ const TEST = true;
+
+ public function test()
+ {
+ A::test();
+ }
+}
+
+$b = new B;
+$b->test();
+--EXPECT--
+bool(true)