recent searches:
include functions ,
variable functions ,
post functions...
If you are new to PHP or just need to refresh your skills, this is the place to start. This series of tutorials will give you the basic knowledge you will need to create a simple PHP website.
PHP is a reflective programming language originally designed for producing dynamic web pages.[1] PHP is used mainly in server-side scripting, but can be used from a command line interface or in standalone graphical applications. Textual User Interfaces can also be created using ncurses.
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:
Table 13-1. A few "magical" PHP constants
| Name | Description |
|---|---|
| __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. Since PHP 4.0.2, __FILE__ always contains an absolute path whereas in older versions it contained relative path under some circumstances. |
| __FUNCTION__ | The function name. (Added in PHP 4.3.0) As of PHP 5 this constant returns the function name as it was declared (case-sensitive). In PHP 4 its value is always lowercased. |
| __CLASS__ | The class name. (Added in PHP 4.3.0) As of PHP 5 this constant returns the class name as it was declared (case-sensitive). In PHP 4 its value is always lowercased. |
| __METHOD__ | The class method name. (Added in PHP 5.0.0) The method name is returned as it was declared (case-sensitive). |
See also get_class(), get_object_vars(), file_exists() and function_exists().
Another Useful functions:
zend.copy-constructor | zend-api.zval-update-constant | zend-api.zend-update-class-constants | zend-api.zend-u-register-constant | zend-api.zend-u-get-constant | zend-api.zend-register-stringl-constant | zend-api.zend-register-string-constant | zend-api.zend-register-long-constant | zend-api.zend-register-double-constant | zend-api.zend-register-constant | zend-api.zend-get-constant | zend-api.zend-declare-class-constant | zend-api.zend-declare-class-constant-stringl | zend-api.zend-declare-class-constant-string | zend-api.zend-declare-class-constant-long | zend-api.zend-declare-class-constant-double | zend-api.zend-declare-class-constant-bool | zend-api.register-stringl-constant | zend-api.register-string-constant | zend-api.register-main-stringl-constant | zend-api.register-main-string-constant | zend-api.register-main-long-constant | zend-api.register-main-double-constant | zend-api.register-long-constant | zend-api.register-double-constant | streams.constants | reserved.constants | migration52.global-constants | migration52.class-constants | language.oop5.constants | language.oop.constructor | language.constants.predefined | language.constants | internals.pdo.constants | http.constants | function.xsl-xsltprocessor-construct | function.tidy-construct | function.swish-construct | function.swfvideostream.construct | function.swftextfield.construct | function.swftext.construct | function.swfsprite.construct | function.swfsound.construct | function.swfshape.construct | function.swfprebuiltclip.construct | function.swfmovie.construct | function.swfmorph.construct | function.swfgradient.construct | function.swffont.construct | function.swfbutton.construct | function.swfbitmap.construct | function.swfaction.construct | function.soap-soapvar-construct | function.soap-soapserver-construct | function.soap-soapparam-construct | function.soap-soapheader-construct | function.soap-soapfault-construct | function.soap-soapclient-construct | function.simplexml-element-construct | function.sdo-model-reflectiondataobject-construct | function.sdo-das-relational-construct | function.sammessage-constructor | function.samconnection-constructor | function.runkit-constant-remove | function.runkit-constant-redefine | function.runkit-constant-add | function.pharfileinfo-construct | function.phar-construct | function.pdo-construct | function.ming-useconstants | function.httprequestpool-construct | function.httprequest-construct | function.httpquerystring-construct | function.httpmessage-construct | function.httpinflatestream-construct | function.httpdeflatestream-construct | function.harudoc-construct | function.get-defined-constants | function.dom-domxpath-construct | function.dom-domtext-construct | function.dom-domprocessinginstruction-construct | function.dom-domimplementation-construct | function.dom-domentityreference-construct | function.dom-domelement-construct | function.dom-domdocument-construct | function.dom-domcomment-construct | function.dom-domattr-construct | function.directoryiterator-construct | function.constant | function.bcompiler-write-constant | function.arrayobject-construct | function.apc-load-constants | function.apc-define-constants | curl.constants |
PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML. If you are new to PHP and want to get some idea of how it works, try the introductory tutorial. After that, check out the online manual, and the example archive sites and some of the other resources available in the links section.