title: PHP equivalent to [&, epsilon] C++ "Capturing" variables in lambda?
body: <p>Is there a way I can pass any variable currently in scope by reference to a lambda function without listing them all in the <code>use(...)</code> statement?</p>
  
  <p>Something like</p>
  
  <pre><code>$foo = 12;
  $bar = 'hello';
  
  $run = function() use (&amp;) {
      $foo = 13;
      $bar = 'bye';
  }
  
  // execute $run function
  </code></pre>
  
  <p>Resulting in <code>$foo</code> equal to <code>13</code> and <code>$bar</code> equal to <code>'bye'</code>.</p>