PHP - assign value of function to class constant
<p>Ok this is a stupid question, but I cant think of the exact reason for it being stupid.</p>

<p>In php when you define a class level constant  as in:</p>

<pre><code>const MY_CONSTANT = 'hello constant';
</code></pre>

<p>why cant you initialise this value with a function such as</p>

<pre><code>const MY_FILEPATH = dirname(dirname(__FILE__)) . '/heres-my-file.php';
</code></pre>
