title: Get Initial php script file name not by __FILE__
body: <p>I'm looking for a way to get what the current script running.  But the thing is I can't use <code>__FILE__</code> since it gives me the file i'm currently in and in the case of an included file, I want the initial file.</p>
  
  <p>So if I run
  <code>index.php</code> and in that file there is an <code>include('test.php')</code>
  I want to be able in test.php to get <code>'index.php'</code> as the current file im runing.</p>
  
  <p>I know I could do <code>__FILE__</code> in <code>index.php</code> and keep the value in an variable.  But i'm looking for a way with minimal change to my files.</p>
  
  <p>Also the script is running in CLI on windows.  So trying to parse the the path wont work also.</p>
  
  <p>What are my options?</p>
  
  <p>Thanks to everyone taking the time to read this :)</p>