summaryrefslogtreecommitdiff
path: root/Zend/tests/closure_050.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/tests/closure_050.phpt')
-rw-r--r--Zend/tests/closure_050.phpt22
1 files changed, 22 insertions, 0 deletions
diff --git a/Zend/tests/closure_050.phpt b/Zend/tests/closure_050.phpt
new file mode 100644
index 0000000000..d43f325ef1
--- /dev/null
+++ b/Zend/tests/closure_050.phpt
@@ -0,0 +1,22 @@
+--TEST--
+Closure 050: static::class in non-static closure in non-static method.
+
+--FILE--
+<?php
+
+class A {
+ function foo() {
+ $f = function() {
+ return static::class;
+ };
+ return $f();
+ }
+}
+
+class B extends A {}
+
+$b = new B;
+var_dump($b->foo());
+
+--EXPECT--
+string(1) "B"