Check if a file was included orloaded
<p>Is there any elegant way to check if a file was included by using <code>include</code>/<code>include_once</code>/<code>require</code>/<code>require_once</code> or if the page was actually loaded directly? I'm trying to set up a testing file inside class files while I'm creating them.</p>

<p>I'm looking for something similar to Python's <code>if __name__ == "__main__":</code> technique. Without setting globals or constants</p>
