Joined June 2013
·

Sebastiaan van Stijn

DPI Animation House
·
Lisse, Netherlands
·
·

Posted to PHP get class name without namespace over 1 year ago

ReflectionClass is actually faster;

(new \ReflectionClass($this))->getShortName();

I'd remove the interim dt variable, probably no reason to have it. Also, a more descriptive name wouldn't hurt, e.g. dateFromUnixTimeStamp()

Achievements
2 Karma
0 Total ProTip Views