PHP get_called_class function

I learned about the PHP get_called_class function today. Basically it returns the name of the class that the function that’s running is defined in. Handy for figuring out which class a static method is running in. Compare with get_class.

Leave a Reply