summaryrefslogtreecommitdiff
path: root/Zend/tests/bug70958.phpt
diff options
context:
space:
mode:
authorXinchen Hui <laruence@gmail.com>2015-11-23 18:29:59 +0800
committerXinchen Hui <laruence@gmail.com>2015-11-23 18:29:59 +0800
commita2b85ddecf666281717e50246950fd6d153bb0a8 (patch)
tree3fa874a92f91c14c2a0403386840bd66f4deb4a3 /Zend/tests/bug70958.phpt
parentab17840d33354cc32d24c88d3e401d7b0869c996 (diff)
downloadphp-git-a2b85ddecf666281717e50246950fd6d153bb0a8.tar.gz
Fixed bug #70958 (Invalid opcode while using ::class as trait method paramater default value)
Diffstat (limited to 'Zend/tests/bug70958.phpt')
-rw-r--r--Zend/tests/bug70958.phpt21
1 files changed, 21 insertions, 0 deletions
diff --git a/Zend/tests/bug70958.phpt b/Zend/tests/bug70958.phpt
new file mode 100644
index 0000000000..b00d7aea81
--- /dev/null
+++ b/Zend/tests/bug70958.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Bug #70958 (Invalid opcode while using ::class as trait method paramater default value)
+--FILE--
+<?php
+trait Foo
+{
+ function bar($a = self::class) {
+ var_dump($a);
+ }
+}
+
+class B {
+ use Foo;
+}
+
+$b = new B;
+
+$b->bar();
+?>
+--EXPECT--
+string(1) "B"