Welcome
PHP provides a large number of predefined constants to any script which it runs.
There are Basically five magical constants that change depending on where they are used.
Name | Description |
---|---|
__LINE__ | Represents current line number where it is used. |
__FILE__ | Represents full path and file name of the file. If it is used inside an include, name of included file is returned. |
__FUNCTION__ | Represents the function name where it is used. If it is used outside of any function, then it will return blank. |
__CLASS__ | Represents the class name where it is used. If it is used outside of any function, then it will return blank. |
__METHOD__ | Represents the name of the class method where it is used. The method name is returned as it was declared. |
The current line number of the file where it is used.
_LINE_
The Line number : 3
_FILE_
Represents full path and file name of the file. If it is used inside an include, name of included file is returned.
Your file name :D:\SQLBD\htdocs\php\index.php
_FUNCTION_
_FUNCTION_
Represents the function name where it is used. If it is used outside of any function, then it will return blank._METHOD_
Represents the class name where it is used. If it is used outside of any function, then it will return blank._CLASS_
Represents the name of the class method where it is used. The method name is returned as it was declared.
Function
of demo class : testMethod
of demo class : demo::testmeClass
: demo