I\'m trying to figure out how I can use a variable that has been set outside a function, inside a function. Is there any way of doing this? I\'ve tried to set the variable t
$var = '1'; function addOne() use($var) { return $var + 1; }