Name some of the constants in PHP and their purpose

Posted by Prem Tiwari | Updated on

Below are the name some of the constants  in PHP and their purpose:

  1.  _LINE_ – It represents the current line number of the file.
  2.  _FILE_ – It represents the full path and filename of the file. If used inside an include,the name of the included file is returned.
  3. _FUNCTION_ – It represents the function name.
  4. _CLASS_ – It returns the class name as it was declared.
  5. _METHOD_ – It represents the class method name.

If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@] Your question and answer will appear on and help other developers.

Related Questions & Answers