Original script directory in PHP
<p>Magic constant  <code>__DIR__</code>  is the directory of the current script, but what if I need the directory of the script that included or required it, i.e., the original script? Is there something like a <code>__ORIGINALDIR__</code>?</p>

<p>In particular, if the directory of the current script equals the directory of the original script then we should get <code>__ORIGINALDIR__ === __DIR__</code>.</p>
