1
0
mirror of https://github.com/php/php-src.git synced 2026-04-29 03:03:26 +02:00
Files
DanielEScherzer a50f82bebf Zend/tests: organize some tests with sub directories (6) (#17807)
Move more tests into existing directories

Work towards GH-15631
2025-02-15 14:55:07 +00:00

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