mirror of
https://github.com/php/php-src.git
synced 2024-11-24 10:24:11 +08:00
35662c9bd3
Also commit a test I forgot to add for forbidden use() of auto-globals.
15 lines
239 B
PHP
15 lines
239 B
PHP
--TEST--
|
|
Can't use name of lexical variable for parameter
|
|
--FILE--
|
|
<?php
|
|
|
|
$a = 1;
|
|
$fn = function ($a) use ($a) {
|
|
var_dump($a);
|
|
};
|
|
$fn(2);
|
|
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Cannot use lexical variable $a as a parameter name in %s on line %d
|