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