1--TEST--
2Disallows using non-static closures.
3--FILE--
4<?php
5
6class C {
7    public Closure $d = function () {
8        var_dump($this);
9    };
10}
11
12$foo = new C();
13var_dump($foo->d);
14($foo->d)();
15
16?>
17--EXPECTF--
18Fatal error: Closures in constant expressions must be static in %s on line %d
19