Hello there,

Is there a way to get the child class name from within the parent method?

If so, how?

Thx in advance.

Example:

class MyParent {
 public static function start() {
  // Do something like this???
  return get_child_name(); // returns 'MyChild' in this case
 }
}

class MyChild extends MyParent {
 public static childStart() {
  // Should return the child class name.
  echo parent::start();
 }
}

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to