📜  在匿名函数中使用全局变量 - 无论代码示例

📅  最后修改于: 2022-03-11 14:58:01.879000             🧑  作者: Mango

代码示例1
$variable;

functionName($someArgument, function() use(&$variable) {
  $variable = "something";
});

this is called closure;