PHP: how can a class reference its own name?

Posted by Nathan Long on Stack Overflow See other posts from Stack Overflow or by Nathan Long
Published on 2010-04-07T16:21:48Z Indexed on 2010/04/07 16:33 UTC
Read the original article Hit count: 215

Filed under:
|

In PHP, how can a class reference its own name?

For example, what would the method look like to do this?

Dog::sayOwnClassName();
//echos "Dog";

© Stack Overflow or respective owner

Related posts about php5

Related posts about php