PHP Magic Constants
PHP provides a large number of predefined constants to any script which it runs. Many of these constants, however, are created by various extensions, and will only be present when those extensions are available, either via dynamic loading or because they have been compiled in.
There are five magical constants that change depending on where they are used. For example, the value of __LINE__ depends on the line that it’s used on in your script. These special constants are case-insensitive and are as follows:
__LINE__ : The current line number of the file.
__FILE__ : The full path and filename of the file. If used inside an include, the name of the included file is returned.
__FUNCTION__ : The function name. This constant returns the function name
as it was declared.
__CLASS__ : The class name. This constant returns the class name
as it was declared
__METHOD__ : The class method name. The method name is returned as it was declared
Filed under: PHP