1--TEST--
2Closure in property initializer may access private variables
3--FILE--
4<?php
5
6class C {
7    public Closure $d = static function (C $c) {
8        echo $c->secret, PHP_EOL;
9    };
10
11    public function __construct(
12        private string $secret,
13    ) {}
14}
15
16$c = new C('secret');
17($c->d)($c);
18
19
20?>
21--EXPECTF--
22secret
23