mirror of
https://github.com/php/php-src.git
synced 2024-09-22 10:27:25 +00:00
17 lines
250 B
Plaintext
17 lines
250 B
Plaintext
|
--TEST--
|
||
|
Cannot use() auto-global
|
||
|
--FILE--
|
||
|
<?php
|
||
|
|
||
|
function test() {
|
||
|
$fn = function() use($GLOBALS) {
|
||
|
var_dump($GLOBALS);
|
||
|
};
|
||
|
$fn();
|
||
|
}
|
||
|
test();
|
||
|
|
||
|
?>
|
||
|
--EXPECTF--
|
||
|
Fatal error: Cannot use auto-global as lexical variable in %s on line %d
|