PHP include practices
<p>Does anyone here know when PHP executes include and include_once calls?</p>

<p>I'm wondering because I come from a Flash and Desktop development background where you have to import your classes at the beginning of each class.</p>

<p>But now that I am starting to build more complex PHP code, it seems like it would be better to just include classes when I actually need them to save on loading time. For example, look at the following psuedo code:</p>

<pre><code>if (I_need_to_check_login)
 { 
   include_once "Class.class.php";
   $C = new Class();
 }
</code></pre>

<p>If I do this, is the file Class.class.php going to be included everytime the code is run or only when I execute the include_once.</p>

<p>I'm a bit of a Class freak and usually build a class for just about any functionality used by my apps, so I often have lots of class files.</p>

<p>take care,
lee</p>
