xref: /PHP-8.2/Zend/tests/bug69568.phpt (revision d9c2959c)
1--TEST--
2Bug #69568: call a private function in closure failed
3--FILE--
4<?php
5class A {
6
7    private static function testprivate() {
8        return 1;
9    }
10    public static function test() {
11        return function() {
12            return self::testprivate();
13        };
14    }
15}
16
17class B extends A {
18}
19
20$fn = B::test();
21echo $fn();
22
23?>
24--EXPECT--
251
26