"Use of undefined constant" notice, but the constant should be defined
<p>there are three files: common.php, controller.php and user.php. </p>

<p>File common.php looks like:</p>

<pre><code>&lt;?php
define("MAXIMUM_NAME_LENGTH", 50);
?&gt;
</code></pre>

<p>File controller.php looks like:</p>

<pre><code>&lt;?php
include("common.php");
include("user.php");
$user = new user();
?&gt;
</code></pre>

<p>File user.php looks like:</p>

<pre><code>&lt;?php
class user{
private $var = MAXIMUM_NAME_LENGTH;
}
?&gt;
</code></pre>

<p>When executing script there is given notice: Notice: Use of undefined constant MAXIMUM_NAME_LENGTH - assumed 'MAXIMUM_NAME_LENGTH' in /.../controller.php on line xxx. I want to share defined values in common.php between other files. How to do it in a proper way?</p>
