Cannot use variable $%S twice
Description
The same variable cannt be mentioned twice in the use part of a closure definition. This would mean the same argument is defined twice, which is useless.
Example
<?php
$fn = function() use ($a, &$a) {
$a = 2;
};
?>
Literal Examples
- Cannot use variable $a twice
Alternatives
- Make all variables mentioned in the use expression unique (with or without the reference).