diff options
Diffstat (limited to 'Zend/tests/closure_056.phpt')
-rw-r--r-- | Zend/tests/closure_056.phpt | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Zend/tests/closure_056.phpt b/Zend/tests/closure_056.phpt new file mode 100644 index 0000000000..566de10d83 --- /dev/null +++ b/Zend/tests/closure_056.phpt @@ -0,0 +1,21 @@ +--TEST-- +Closure 056: self::class in non-static closure in static method. + +--FILE-- +<?php + +class A { + static function foo() { + $f = function() { + return self::class; + }; + return $f(); + } +} + +class B extends A {} + +var_dump(B::foo()); + +--EXPECT-- +string(1) "A" |