PHP Magic Constants

Magic Constants are mainly used for debugging OR logging purposes in PHP.

  • __LINE__ (gives LINE NUNBERS for debugging)
  • __FILE__ (full path to the file u are working one)
  • __DIR__ (folders of my file)
  • __FUNCTION__ (when used with ECHO you can print out name of the function u are using