function callback($callback){ $callback(); } $var = 'just for test'; callback(function() use (&$var){ echo "Closures test{$var}"; });