См. Магические константы
Для класс :
__CLASS__
The class name. The class name includes the namespace it was declared in (e.g. Foo\Bar). Note that as of PHP 5.4 __CLASS__ works also in traits. When used in a trait method, __CLASS__ is the name of the class the trait is used in.
Для файл :
__FILE__
The full path and filename of the file with symlinks resolved. If used inside an include, the name of the included file is returned.
Для path :
__DIR__
The directory of the file. If used inside an include, the directory of the included file is returned. This is equivalent to dirname(__FILE__). This directory name does not have a trailing slash unless it is the root directory.
Это пример того, как использовать магические константы для включения классов без записи каждого класса в каждом эхо:
echo “[”.__CLASS__.”] message: test1, asd!”