PHP: Can't assign a constant in a function?
<p>I have a function called getSources(); In this function I want to easily assign numbers to constants. I figured this would work:</p>

<pre><code>const A = 1;
const B = 2;
const C = 3;
const D = 4;
</code></pre>

<p>And I could just do this:</p>

<pre><code>$someValue = A;
</code></pre>

<p>But it doesn't work. What am I missing? I don't want these variables to be used outside of the scope of this function.</p>
