<?phpnamespace My\App { class Api { public static fetch() { print __FUNCTION__ . "\n"; // outputs fetch print __METHOD__ . "\n"; // outputs My\App\Api::fetch } } Api::fetch();}namespace { My\App\Api::fetch();}?>__METHOD__ outputs a fully qualified method name; __FUNCTION__ when used in a method, outputs just the method name.