mirror of
https://github.com/php/php-src.git
synced 2026-04-29 03:03:26 +02:00
a50f82bebf
Move more tests into existing directories Work towards GH-15631
18 lines
270 B
PHP
18 lines
270 B
PHP
--TEST--
|
|
Disallows using variables.
|
|
--FILE--
|
|
<?php
|
|
|
|
$foo = "bar";
|
|
|
|
const Closure = static function () use ($foo) {
|
|
echo $foo, PHP_EOL;
|
|
};
|
|
|
|
var_dump(Closure);
|
|
(Closure)();
|
|
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Cannot use(...) variables in constant expression in %s on line %d
|