PHP: Can I get the line where my method has been called inside my class?
<p>Say I have MyClass.php</p>

<pre><code>class MyClass
{
    public static function myMethod()
    {
        // Here I want to know the line (and file) where my method has been called
    }
}
</code></pre>

<p>And SomeOtherFile.php</p>

<pre><code>// other code ...

MyClass::myMethod();

// other code ...
</code></pre>

<p>So, is there a way to get the line from SomeOtherFile, where myMethod() has been called directly in myMethod? I mean, without passing the line as parameter.</p>
