xref: /PHP-7.2/Zend/tests/closure_049.phpt (revision f1d7e3ca)
1--TEST--
2Closure 049: static::class in static closure in non-static method.
3--FILE--
4<?php
5
6class A {
7    function foo() {
8        $f = static function() {
9            return static::class;
10        };
11        return $f();
12    }
13}
14
15class B extends A {}
16
17$b = new B;
18
19var_dump($b->foo());
20--EXPECT--
21string(1) "B"
22