1--TEST--
2Disallows using variables.
3--FILE--
4<?php
5
6$foo = "bar";
7
8const Closure = static function () use ($foo) {
9 echo $foo, PHP_EOL;
10};
11
12var_dump(Closure);
13(Closure)();
14
15?>
16--EXPECTF--
17Fatal error: Cannot use(...) variables in constant expression in %s on line %d
18