Get parent function within class
<p>is following somehow possible? And if so how?!
I know i could pass a parameter but I'd like it to be dynamic!</p>

<pre><code>&lt;?php

class my_class {

  protected $parent = NULL;

  public function __construct() {

    // now i'd like to get the name of the function where this class has been called
    $this-&gt;parent = get_parent_function();

  }

  public function parent() {
    return $this-&gt;parent;
  }

}

function some_random_function() {
  // Do something
  $object = new my_class();

  print $object-&gt;parent(); // returns: some_random_function
}

?&gt;
</code></pre>

<p>Thanks in advance!</p>
