Accessing global variables in PHP function
<p>I'm new to php and I can't understand why is it that the variable "cons" isn't recognized by the the compiler when used inside the function "func", in the following code:</p>

<pre><code>$cons = 1;

function plusCons($num) {
   return $num + $cons;
}
</code></pre>

<p>is it impossible to use global variables inside of a function's scope?</p>
