PHP has large number of predefined constants. This HOWTO will present the seven most important, most practical and most useful PHP Magic Constants. FILE – The full path and filename of the file. DIR – The directory of the file. FUNCTION – The function name. CLASS – The class name. METHOD – The class method name. LINE – The current line number of the file. NAMESPACE – The name of the current namespace This is example PHP script with comments, which demonstrate howto use all previously mentioned PHP Magic Constants.