mirror of
https://github.com/php/php-src.git
synced 2024-09-29 05:46:06 +00:00
16 lines
215 B
Plaintext
16 lines
215 B
Plaintext
|
--TEST--
|
||
|
Closure cannot use one variable twice
|
||
|
--FILE--
|
||
|
<?php
|
||
|
|
||
|
$a = 1;
|
||
|
$fn = function() use ($a, &$a) {
|
||
|
$a = 2;
|
||
|
};
|
||
|
$fn();
|
||
|
var_dump($a);
|
||
|
|
||
|
?>
|
||
|
--EXPECTF--
|
||
|
Fatal error: Cannot use variable $a twice in %s on line %d
|