Php Deep Introduction
Transcript of Php Deep Introduction
-
8/17/2019 Php Deep Introduction
1/19
PHP From Wikipedia, the free encyclopedia
This article is about the scripting language. For other uses, see PHP (disambiguation).
PHP
Paradigm Imperative, functional, object-
oriented , procedural, reflective
Designed by Rasmus Lerdorf
Developer Zend Technologies
First appeared 1995; 21 years ago[1]
Stable release 7.0.6[2] / April 29, 2016; 2 days ago
Typing discipline Dynamic, weak
Implementation
language
C (primarily; some components C++)
OS Unix-like, Windows
License PHP License (most of Zend engine
under Zend Engine License)
Filename extensions .php, .phtml, .php3, .php4, .php5, .phps
https://en.wikipedia.org/wiki/PHP_(disambiguation)https://en.wikipedia.org/wiki/PHP_(disambiguation)https://en.wikipedia.org/wiki/PHP_(disambiguation)https://en.wikipedia.org/wiki/Programming_paradigmhttps://en.wikipedia.org/wiki/Imperative_programminghttps://en.wikipedia.org/wiki/Imperative_programminghttps://en.wikipedia.org/wiki/Functional_programminghttps://en.wikipedia.org/wiki/Functional_programminghttps://en.wikipedia.org/wiki/Functional_programminghttps://en.wikipedia.org/wiki/Object-oriented_programminghttps://en.wikipedia.org/wiki/Object-oriented_programminghttps://en.wikipedia.org/wiki/Object-oriented_programminghttps://en.wikipedia.org/wiki/Object-oriented_programminghttps://en.wikipedia.org/wiki/Procedural_programminghttps://en.wikipedia.org/wiki/Procedural_programminghttps://en.wikipedia.org/wiki/Procedural_programminghttps://en.wikipedia.org/wiki/Reflective_programminghttps://en.wikipedia.org/wiki/Reflective_programminghttps://en.wikipedia.org/wiki/Reflective_programminghttps://en.wikipedia.org/wiki/Software_designhttps://en.wikipedia.org/wiki/Software_designhttps://en.wikipedia.org/wiki/Rasmus_Lerdorfhttps://en.wikipedia.org/wiki/Rasmus_Lerdorfhttps://en.wikipedia.org/wiki/Software_developerhttps://en.wikipedia.org/wiki/Software_developerhttps://en.wikipedia.org/wiki/Zend_Technologieshttps://en.wikipedia.org/wiki/Zend_Technologieshttps://en.wikipedia.org/wiki/PHP#cite_note-mysqlconference-1https://en.wikipedia.org/wiki/PHP#cite_note-mysqlconference-1https://en.wikipedia.org/wiki/Software_release_life_cyclehttps://en.wikipedia.org/wiki/Software_release_life_cyclehttps://en.wikipedia.org/wiki/PHP#cite_note-php7final-2https://en.wikipedia.org/wiki/PHP#cite_note-php7final-2https://en.wikipedia.org/wiki/PHP#cite_note-php7final-2https://en.wikipedia.org/wiki/Type_systemhttps://en.wikipedia.org/wiki/Type_systemhttps://en.wikipedia.org/wiki/Dynamic_typinghttps://en.wikipedia.org/wiki/Dynamic_typinghttps://en.wikipedia.org/wiki/Weak_typinghttps://en.wikipedia.org/wiki/Weak_typinghttps://en.wikipedia.org/wiki/Weak_typinghttps://en.wikipedia.org/wiki/C_(programming_language)https://en.wikipedia.org/wiki/C_(programming_language)https://en.wikipedia.org/wiki/C%2B%2Bhttps://en.wikipedia.org/wiki/C%2B%2Bhttps://en.wikipedia.org/wiki/C%2B%2Bhttps://en.wikipedia.org/wiki/Operating_systemhttps://en.wikipedia.org/wiki/Operating_systemhttps://en.wikipedia.org/wiki/Unix-likehttps://en.wikipedia.org/wiki/Unix-likehttps://en.wikipedia.org/wiki/Windowshttps://en.wikipedia.org/wiki/Windowshttps://en.wikipedia.org/wiki/Windowshttps://en.wikipedia.org/wiki/Software_licensehttps://en.wikipedia.org/wiki/Software_licensehttps://en.wikipedia.org/wiki/PHP_Licensehttps://en.wikipedia.org/wiki/PHP_Licensehttps://en.wikipedia.org/wiki/Zend_Engine_Licensehttps://en.wikipedia.org/wiki/Zend_Engine_Licensehttps://en.wikipedia.org/wiki/Zend_Engine_Licensehttps://en.wikipedia.org/wiki/Filename_extensionhttps://en.wikipedia.org/wiki/Filename_extensionhttps://en.wikipedia.org/wiki/File:PHP_Logo.pnghttps://en.wikipedia.org/wiki/Filename_extensionhttps://en.wikipedia.org/wiki/Zend_Engine_Licensehttps://en.wikipedia.org/wiki/PHP_Licensehttps://en.wikipedia.org/wiki/Software_licensehttps://en.wikipedia.org/wiki/Windowshttps://en.wikipedia.org/wiki/Unix-likehttps://en.wikipedia.org/wiki/Operating_systemhttps://en.wikipedia.org/wiki/C%2B%2Bhttps://en.wikipedia.org/wiki/C_(programming_language)https://en.wikipedia.org/wiki/Weak_typinghttps://en.wikipedia.org/wiki/Dynamic_typinghttps://en.wikipedia.org/wiki/Type_systemhttps://en.wikipedia.org/wiki/PHP#cite_note-php7final-2https://en.wikipedia.org/wiki/Software_release_life_cyclehttps://en.wikipedia.org/wiki/PHP#cite_note-mysqlconference-1https://en.wikipedia.org/wiki/Zend_Technologieshttps://en.wikipedia.org/wiki/Software_developerhttps://en.wikipedia.org/wiki/Rasmus_Lerdorfhttps://en.wikipedia.org/wiki/Software_designhttps://en.wikipedia.org/wiki/Reflective_programminghttps://en.wikipedia.org/wiki/Procedural_programminghttps://en.wikipedia.org/wiki/Object-oriented_programminghttps://en.wikipedia.org/wiki/Object-oriented_programminghttps://en.wikipedia.org/wiki/Functional_programminghttps://en.wikipedia.org/wiki/Imperative_programminghttps://en.wikipedia.org/wiki/Programming_paradigmhttps://en.wikipedia.org/wiki/PHP_(disambiguation)
-
8/17/2019 Php Deep Introduction
2/19
Website php.net
Major implementations
Zend Engine, HHVM, Phalanger , Quercus, Project Zero, Parrot
Influenced by
Perl, C, C++, Java, Tcl[1]
Influenced
Falcon, Hack
PHP Programming at Wikibooks
PHP is a server-side scripting language designed for web development but also used as a general-purpose programming language. Originally created by Rasmus Lerdorf in 1994,[3] the PHP referenceimplementation is now produced by The PHP Group.[4] PHP originally stood for Personal HomePage,[3] but it now stands for the recursive backronym PHP: Hypertext Preprocessor .[5]
PHP code may be embedded into HTML code, or it can be used in combination with various webtemplate systems, web content management system and web frameworks. PHP code is usuallyprocessed by a PHP interpreter implemented as a module in the web server or as a Common
Gateway Interface (CGI) executable. The web server combines the results of the interpreted andexecuted PHP code, which may be any type of data, including images, with the generated webpage. PHP code may also be executed with a command-line interface (CLI) and can be used toimplement standalone graphical applications.[6]
The standard PHP interpreter, powered by the Zend Engine, is free software released underthe PHP License. PHP has been widely ported and can be deployed on most web servers on almostevery operating system and platform, free of charge.[7]
The PHP language evolved without a written formal specification or standard until 2014, leaving thecanonical PHP interpreter as a de facto standard. Since 2014 work has gone on to create a formalPHP specification.[8]
Contents
[hide]
1History
o 1.1Early history
o 1.2PHP 3 and 4
o 1.3PHP 5
o 1.4PHP 6 and Unicode
o 1.5PHP 7
https://php.net/https://en.wikipedia.org/wiki/Programming_language_implementationhttps://en.wikipedia.org/wiki/Programming_language_implementationhttps://en.wikipedia.org/wiki/Programming_language_implementationhttps://en.wikipedia.org/wiki/Zend_Enginehttps://en.wikipedia.org/wiki/Zend_Enginehttps://en.wikipedia.org/wiki/HHVMhttps://en.wikipedia.org/wiki/HHVMhttps://en.wikipedia.org/wiki/HHVMhttps://en.wikipedia.org/wiki/Phalanger_(compiler)https://en.wikipedia.org/wiki/Phalanger_(compiler)https://en.wikipedia.org/wiki/Phalanger_(compiler)https://en.wikipedia.org/wiki/Quercus_(software)https://en.wikipedia.org/wiki/Quercus_(software)https://en.wikipedia.org/wiki/Quercus_(software)https://en.wikipedia.org/wiki/Project_Zerohttps://en.wikipedia.org/wiki/Project_Zerohttps://en.wikipedia.org/wiki/Project_Zerohttps://en.wikipedia.org/wiki/Parrot_virtual_machinehttps://en.wikipedia.org/wiki/Parrot_virtual_machinehttps://en.wikipedia.org/wiki/Parrot_virtual_machinehttps://en.wikipedia.org/wiki/Perlhttps://en.wikipedia.org/wiki/Perlhttps://en.wikipedia.org/wiki/C_(programming_language)https://en.wikipedia.org/wiki/C_(programming_language)https://en.wikipedia.org/wiki/C_(programming_language)https://en.wikipedia.org/wiki/C%2B%2Bhttps://en.wikipedia.org/wiki/C%2B%2Bhttps://en.wikipedia.org/wiki/C%2B%2Bhttps://en.wikipedia.org/wiki/Java_(programming_language)https://en.wikipedia.org/wiki/Java_(programming_language)https://en.wikipedia.org/wiki/Java_(programming_language)https://en.wikipedia.org/wiki/Tclhttps://en.wikipedia.org/wiki/Tclhttps://en.wikipedia.org/wiki/Tclhttps://en.wikipedia.org/wiki/Tclhttps://en.wikipedia.org/wiki/Falcon_(programming_language)https://en.wikipedia.org/wiki/Falcon_(programming_language)https://en.wikipedia.org/wiki/Hack_(programming_language)https://en.wikipedia.org/wiki/Hack_(programming_language)https://en.wikipedia.org/wiki/Hack_(programming_language)https://en.wikibooks.org/wiki/PHP_Programminghttps://en.wikibooks.org/wiki/PHP_Programminghttps://en.wikipedia.org/wiki/Server-side_scriptinghttps://en.wikipedia.org/wiki/Server-side_scriptinghttps://en.wikipedia.org/wiki/Server-side_scriptinghttps://en.wikipedia.org/wiki/Web_developmenthttps://en.wikipedia.org/wiki/Web_developmenthttps://en.wikipedia.org/wiki/Web_developmenthttps://en.wikipedia.org/wiki/General-purpose_programming_languagehttps://en.wikipedia.org/wiki/General-purpose_programming_languagehttps://en.wikipedia.org/wiki/General-purpose_programming_languagehttps://en.wikipedia.org/wiki/General-purpose_programming_languagehttps://en.wikipedia.org/wiki/Rasmus_Lerdorfhttps://en.wikipedia.org/wiki/Rasmus_Lerdorfhttps://en.wikipedia.org/wiki/Rasmus_Lerdorfhttps://en.wikipedia.org/wiki/PHP#cite_note-History_of_PHP-3https://en.wikipedia.org/wiki/PHP#cite_note-History_of_PHP-3https://en.wikipedia.org/wiki/PHP#cite_note-History_of_PHP-3https://en.wikipedia.org/wiki/Reference_implementationhttps://en.wikipedia.org/wiki/Reference_implementationhttps://en.wikipedia.org/wiki/Reference_implementationhttps://en.wikipedia.org/wiki/Reference_implementationhttps://en.wikipedia.org/wiki/PHP#cite_note-about_PHP-4https://en.wikipedia.org/wiki/PHP#cite_note-about_PHP-4https://en.wikipedia.org/wiki/PHP#cite_note-about_PHP-4https://en.wikipedia.org/wiki/PHP#cite_note-History_of_PHP-3https://en.wikipedia.org/wiki/PHP#cite_note-History_of_PHP-3https://en.wikipedia.org/wiki/PHP#cite_note-History_of_PHP-3https://en.wikipedia.org/wiki/Recursive_acronymhttps://en.wikipedia.org/wiki/Recursive_acronymhttps://en.wikipedia.org/wiki/Backronymhttps://en.wikipedia.org/wiki/Backronymhttps://en.wikipedia.org/wiki/Backronymhttps://en.wikipedia.org/wiki/PHP#cite_note-5https://en.wikipedia.org/wiki/PHP#cite_note-5https://en.wikipedia.org/wiki/PHP#cite_note-5https://en.wikipedia.org/wiki/HTMLhttps://en.wikipedia.org/wiki/HTMLhttps://en.wikipedia.org/wiki/HTMLhttps://en.wikipedia.org/wiki/Web_template_systemhttps://en.wikipedia.org/wiki/Web_template_systemhttps://en.wikipedia.org/wiki/Web_template_systemhttps://en.wikipedia.org/wiki/Web_template_systemhttps://en.wikipedia.org/wiki/Web_frameworkhttps://en.wikipedia.org/wiki/Web_frameworkhttps://en.wikipedia.org/wiki/Web_frameworkhttps://en.wikipedia.org/wiki/Interpreter_(computing)https://en.wikipedia.org/wiki/Interpreter_(computing)https://en.wikipedia.org/wiki/Interpreter_(computing)https://en.wikipedia.org/wiki/Plugin_(computing)https://en.wikipedia.org/wiki/Plugin_(computing)https://en.wikipedia.org/wiki/Plugin_(computing)https://en.wikipedia.org/wiki/Common_Gateway_Interfacehttps://en.wikipedia.org/wiki/Common_Gateway_Interfacehttps://en.wikipedia.org/wiki/Common_Gateway_Interfacehttps://en.wikipedia.org/wiki/Common_Gateway_Interfacehttps://en.wikipedia.org/wiki/Command-line_interfacehttps://en.wikipedia.org/wiki/Command-line_interfacehttps://en.wikipedia.org/wiki/Command-line_interfacehttps://en.wikipedia.org/wiki/Computer_softwarehttps://en.wikipedia.org/wiki/Computer_softwarehttps://en.wikipedia.org/wiki/Graphical_user_interfacehttps://en.wikipedia.org/wiki/Graphical_user_interfacehttps://en.wikipedia.org/wiki/PHP#cite_note-6https://en.wikipedia.org/wiki/PHP#cite_note-6https://en.wikipedia.org/wiki/PHP#cite_note-6https://en.wikipedia.org/wiki/Zend_Enginehttps://en.wikipedia.org/wiki/Zend_Enginehttps://en.wikipedia.org/wiki/Zend_Enginehttps://en.wikipedia.org/wiki/Free_softwarehttps://en.wikipedia.org/wiki/Free_softwarehttps://en.wikipedia.org/wiki/Free_softwarehttps://en.wikipedia.org/wiki/PHP_Licensehttps://en.wikipedia.org/wiki/PHP_Licensehttps://en.wikipedia.org/wiki/PHP_Licensehttps://en.wikipedia.org/wiki/Operating_systemhttps://en.wikipedia.org/wiki/Operating_systemhttps://en.wikipedia.org/wiki/Operating_systemhttps://en.wikipedia.org/wiki/Computing_platformhttps://en.wikipedia.org/wiki/Computing_platformhttps://en.wikipedia.org/wiki/Computing_platformhttps://en.wikipedia.org/wiki/PHP#cite_note-foundations-7https://en.wikipedia.org/wiki/PHP#cite_note-foundations-7https://en.wikipedia.org/wiki/PHP#cite_note-foundations-7https://en.wikipedia.org/wiki/Formal_specificationhttps://en.wikipedia.org/wiki/Formal_specificationhttps://en.wikipedia.org/wiki/Formal_specificationhttps://en.wikipedia.org/wiki/De_factohttps://en.wikipedia.org/wiki/De_factohttps://en.wikipedia.org/wiki/De_factohttps://en.wikipedia.org/wiki/PHP#cite_note-8https://en.wikipedia.org/wiki/PHP#cite_note-8https://en.wikipedia.org/wiki/PHP#cite_note-8https://en.wikipedia.org/wiki/PHPhttps://en.wikipedia.org/wiki/PHPhttps://en.wikipedia.org/wiki/PHPhttps://en.wikipedia.org/wiki/PHP#Historyhttps://en.wikipedia.org/wiki/PHP#Historyhttps://en.wikipedia.org/wiki/PHP#Early_historyhttps://en.wikipedia.org/wiki/PHP#Early_historyhttps://en.wikipedia.org/wiki/PHP#PHP_3_and_4https://en.wikipedia.org/wiki/PHP#PHP_3_and_4https://en.wikipedia.org/wiki/PHP#PHP_5https://en.wikipedia.org/wiki/PHP#PHP_5https://en.wikipedia.org/wiki/PHP#PHP_6_and_Unicodehttps://en.wikipedia.org/wiki/PHP#PHP_6_and_Unicodehttps://en.wikipedia.org/wiki/PHP#PHP_7https://en.wikipedia.org/wiki/PHP#PHP_7https://en.wikipedia.org/wiki/PHP#PHP_7https://en.wikipedia.org/wiki/PHP#PHP_6_and_Unicodehttps://en.wikipedia.org/wiki/PHP#PHP_5https://en.wikipedia.org/wiki/PHP#PHP_3_and_4https://en.wikipedia.org/wiki/PHP#Early_historyhttps://en.wikipedia.org/wiki/PHP#Historyhttps://en.wikipedia.org/wiki/PHPhttps://en.wikipedia.org/wiki/PHP#cite_note-8https://en.wikipedia.org/wiki/De_factohttps://en.wikipedia.org/wiki/Formal_specificationhttps://en.wikipedia.org/wiki/PHP#cite_note-foundations-7https://en.wikipedia.org/wiki/Computing_platformhttps://en.wikipedia.org/wiki/Operating_systemhttps://en.wikipedia.org/wiki/PHP_Licensehttps://en.wikipedia.org/wiki/Free_softwarehttps://en.wikipedia.org/wiki/Zend_Enginehttps://en.wikipedia.org/wiki/PHP#cite_note-6https://en.wikipedia.org/wiki/Graphical_user_interfacehttps://en.wikipedia.org/wiki/Computer_softwarehttps://en.wikipedia.org/wiki/Command-line_interfacehttps://en.wikipedia.org/wiki/Common_Gateway_Interfacehttps://en.wikipedia.org/wiki/Common_Gateway_Interfacehttps://en.wikipedia.org/wiki/Plugin_(computing)https://en.wikipedia.org/wiki/Interpreter_(computing)https://en.wikipedia.org/wiki/Web_frameworkhttps://en.wikipedia.org/wiki/Web_template_systemhttps://en.wikipedia.org/wiki/Web_template_systemhttps://en.wikipedia.org/wiki/HTMLhttps://en.wikipedia.org/wiki/PHP#cite_note-5https://en.wikipedia.org/wiki/Backronymhttps://en.wikipedia.org/wiki/Recursive_acronymhttps://en.wikipedia.org/wiki/PHP#cite_note-History_of_PHP-3https://en.wikipedia.org/wiki/PHP#cite_note-about_PHP-4https://en.wikipedia.org/wiki/Reference_implementationhttps://en.wikipedia.org/wiki/Reference_implementationhttps://en.wikipedia.org/wiki/PHP#cite_note-History_of_PHP-3https://en.wikipedia.org/wiki/Rasmus_Lerdorfhttps://en.wikipedia.org/wiki/General-purpose_programming_languagehttps://en.wikipedia.org/wiki/General-purpose_programming_languagehttps://en.wikipedia.org/wiki/Web_developmenthttps://en.wikipedia.org/wiki/Server-side_scriptinghttps://en.wikibooks.org/wiki/PHP_Programminghttps://en.wikipedia.org/wiki/Hack_(programming_language)https://en.wikipedia.org/wiki/Falcon_(programming_language)https://en.wikipedia.org/wiki/Tclhttps://en.wikipedia.org/wiki/Tclhttps://en.wikipedia.org/wiki/Java_(programming_language)https://en.wikipedia.org/wiki/C%2B%2Bhttps://en.wikipedia.org/wiki/C_(programming_language)https://en.wikipedia.org/wiki/Perlhttps://en.wikipedia.org/wiki/Parrot_virtual_machinehttps://en.wikipedia.org/wiki/Project_Zerohttps://en.wikipedia.org/wiki/Quercus_(software)https://en.wikipedia.org/wiki/Phalanger_(compiler)https://en.wikipedia.org/wiki/HHVMhttps://en.wikipedia.org/wiki/Zend_Enginehttps://en.wikipedia.org/wiki/Programming_language_implementationhttps://php.net/
-
8/17/2019 Php Deep Introduction
3/19
o 1.6Release history
2Mascot
3Syntax
o 3.1Data types
o 3.2Functions
o 3.3PHP Objects
4Implementations
5Licensing
6Development and community
7Installation and configuration
8Use
9Security
10See also
11References
12Further reading
13External links
History [edit] Early history[edit]
Rasmus Lerdorf , who wrote the original Common Gateway Interface (CGI) component, together with Andi
Gutmans and Zeev Suraski, who rewrote the parser that formed PHP 3.
PHP development began in 1994 when Rasmus Lerdorf wrote several Common GatewayInterface (CGI) programs in C,[9][10][11] which he used to maintain his personal homepage. He extended
https://en.wikipedia.org/wiki/PHP#Release_historyhttps://en.wikipedia.org/wiki/PHP#Release_historyhttps://en.wikipedia.org/wiki/PHP#Mascothttps://en.wikipedia.org/wiki/PHP#Mascothttps://en.wikipedia.org/wiki/PHP#Syntaxhttps://en.wikipedia.org/wiki/PHP#Syntaxhttps://en.wikipedia.org/wiki/PHP#Data_typeshttps://en.wikipedia.org/wiki/PHP#Data_typeshttps://en.wikipedia.org/wiki/PHP#Functionshttps://en.wikipedia.org/wiki/PHP#Functionshttps://en.wikipedia.org/wiki/PHP#PHP_Objectshttps://en.wikipedia.org/wiki/PHP#PHP_Objectshttps://en.wikipedia.org/wiki/PHP#Implementationshttps://en.wikipedia.org/wiki/PHP#Implementationshttps://en.wikipedia.org/wiki/PHP#Licensinghttps://en.wikipedia.org/wiki/PHP#Licensinghttps://en.wikipedia.org/wiki/PHP#Development_and_communityhttps://en.wikipedia.org/wiki/PHP#Development_and_communityhttps://en.wikipedia.org/wiki/PHP#Installation_and_configurationhttps://en.wikipedia.org/wiki/PHP#Installation_and_configurationhttps://en.wikipedia.org/wiki/PHP#Usehttps://en.wikipedia.org/wiki/PHP#Usehttps://en.wikipedia.org/wiki/PHP#Securityhttps://en.wikipedia.org/wiki/PHP#Securityhttps://en.wikipedia.org/wiki/PHP#See_alsohttps://en.wikipedia.org/wiki/PHP#See_alsohttps://en.wikipedia.org/wiki/PHP#Referenceshttps://en.wikipedia.org/wiki/PHP#Referenceshttps://en.wikipedia.org/wiki/PHP#Further_readinghttps://en.wikipedia.org/wiki/PHP#Further_readinghttps://en.wikipedia.org/wiki/PHP#External_linkshttps://en.wikipedia.org/wiki/PHP#External_linkshttps://en.wikipedia.org/w/index.php?title=PHP&action=edit§ion=1https://en.wikipedia.org/w/index.php?title=PHP&action=edit§ion=1https://en.wikipedia.org/w/index.php?title=PHP&action=edit§ion=1https://en.wikipedia.org/w/index.php?title=PHP&action=edit§ion=2https://en.wikipedia.org/w/index.php?title=PHP&action=edit§ion=2https://en.wikipedia.org/w/index.php?title=PHP&action=edit§ion=2https://en.wikipedia.org/wiki/Rasmus_Lerdorfhttps://en.wikipedia.org/wiki/Rasmus_Lerdorfhttps://en.wikipedia.org/wiki/Common_Gateway_Interfacehttps://en.wikipedia.org/wiki/Common_Gateway_Interfacehttps://en.wikipedia.org/wiki/Common_Gateway_Interfacehttps://en.wikipedia.org/wiki/Andi_Gutmanshttps://en.wikipedia.org/wiki/Andi_Gutmanshttps://en.wikipedia.org/wiki/Andi_Gutmanshttps://en.wikipedia.org/wiki/Andi_Gutmanshttps://en.wikipedia.org/wiki/Zeev_Suraskihttps://en.wikipedia.org/wiki/Zeev_Suraskihttps://en.wikipedia.org/wiki/Zeev_Suraskihttps://en.wikipedia.org/wiki/Parserhttps://en.wikipedia.org/wiki/Parserhttps://en.wikipedia.org/wiki/Parserhttps://en.wikipedia.org/wiki/Rasmus_Lerdorfhttps://en.wikipedia.org/wiki/Rasmus_Lerdorfhttps://en.wikipedia.org/wiki/Rasmus_Lerdorfhttps://en.wikipedia.org/wiki/Common_Gateway_Interfacehttps://en.wikipedia.org/wiki/Common_Gateway_Interfacehttps://en.wikipedia.org/wiki/Common_Gateway_Interfacehttps://en.wikipedia.org/wiki/Common_Gateway_Interfacehttps://en.wikipedia.org/wiki/PHP#cite_note-php_origins-9https://en.wikipedia.org/wiki/PHP#cite_note-php_origins-9https://en.wikipedia.org/wiki/PHP#cite_note-11https://en.wikipedia.org/wiki/PHP#cite_note-11https://en.wikipedia.org/wiki/Personal_homepagehttps://en.wikipedia.org/wiki/Personal_homepagehttps://en.wikipedia.org/wiki/Personal_homepagehttps://en.wikipedia.org/wiki/File:Zeev_Suraski_2005_cropped.jpghttps://en.wikipedia.org/wiki/File:Andi_Gutmans_1.jpghttps://en.wikipedia.org/wiki/File:Rasmus_Lerdorf_cropped.jpghttps://en.wikipedia.org/wiki/Personal_homepagehttps://en.wikipedia.org/wiki/PHP#cite_note-11https://en.wikipedia.org/wiki/PHP#cite_note-php_origins-9https://en.wikipedia.org/wiki/PHP#cite_note-php_origins-9https://en.wikipedia.org/wiki/Common_Gateway_Interfacehttps://en.wikipedia.org/wiki/Common_Gateway_Interfacehttps://en.wikipedia.org/wiki/Rasmus_Lerdorfhttps://en.wikipedia.org/wiki/Parserhttps://en.wikipedia.org/wiki/Zeev_Suraskihttps://en.wikipedia.org/wiki/Andi_Gutmanshttps://en.wikipedia.org/wiki/Andi_Gutmanshttps://en.wikipedia.org/wiki/Common_Gateway_Interfacehttps://en.wikipedia.org/wiki/Rasmus_Lerdorfhttps://en.wikipedia.org/w/index.php?title=PHP&action=edit§ion=2https://en.wikipedia.org/w/index.php?title=PHP&action=edit§ion=1https://en.wikipedia.org/wiki/PHP#External_linkshttps://en.wikipedia.org/wiki/PHP#Further_readinghttps://en.wikipedia.org/wiki/PHP#Referenceshttps://en.wikipedia.org/wiki/PHP#See_alsohttps://en.wikipedia.org/wiki/PHP#Securityhttps://en.wikipedia.org/wiki/PHP#Usehttps://en.wikipedia.org/wiki/PHP#Installation_and_configurationhttps://en.wikipedia.org/wiki/PHP#Development_and_communityhttps://en.wikipedia.org/wiki/PHP#Licensinghttps://en.wikipedia.org/wiki/PHP#Implementationshttps://en.wikipedia.org/wiki/PHP#PHP_Objectshttps://en.wikipedia.org/wiki/PHP#Functionshttps://en.wikipedia.org/wiki/PHP#Data_typeshttps://en.wikipedia.org/wiki/PHP#Syntaxhttps://en.wikipedia.org/wiki/PHP#Mascothttps://en.wikipedia.org/wiki/PHP#Release_history
-
8/17/2019 Php Deep Introduction
4/19
them to work with web forms and to communicate with databases, and called this implementation"Personal Home Page/Forms Interpreter" or PHP/FI.
PHP/FI could be used to build simple, dynamic web applications. To accelerate bug reporting andimprove the code, Lerdorf initially announced the release of PHP/FI as "Personal Home Page Tools(PHP Tools) version 1.0" on the Usenet discussion group comp.infosystems.www.authoring.cgi onJune 8, 1995.[12][13] This release already had the basic functionality that PHP has as of 2013. This
included Perl-like variables, form handling, and the ability to embed HTML. The syntax resembledthat of Perl but was simpler, more limited and less consistent .[4]
Early PHP was not intended to be a new programming language, and grew organically, with Lerdorfnoting in retrospect: "I don’t know how to stop it, there was never any intent to write a programminglanguage […] I have absolutely no idea how to write a programming language, I just kept adding thenext logical step on the way."[14] A development team began to form and, after months of workand beta testing, officially released PHP/FI 2 in November 1997.
The fact that PHP was not originally designed but instead was developed organically has led toinconsistent naming of functions and inconsistent ordering of their parameters.[15] In some cases, thefunction names were chosen to match the lower-level libraries which PHP was "wrapping" ,[16] while insome very early versions of PHP the length of the function names was used internally as a hash
function, so names were chosen to improve the distribution of hash values.[17]
PHP 3 and 4[edit]
Zeev Suraski and Andi Gutmans rewrote the parser in 1997 and formed the base of PHP 3,changing the language's name to the recursive acronym PHP: HypertextPreprocessor .[4][18] Afterwards, public testing of PHP 3 began, and the official launch came in June1998. Suraski and Gutmans then started a new rewrite of PHP's core, producing the Zend Engine in1999.[19] They also founded Zend Technologies in Ramat Gan, Israel.[4]
On May 22, 2000, PHP 4, powered by the Zend Engine 1.0, was released.[4] As of August 2008 thisbranch reached version 4.4.9. PHP 4 is no longer under development nor will any security updatesbe released.[20][21]
PHP 5[edit]
On July 13, 2004, PHP 5 was released, powered by the new Zend Engine II.[4] PHP 5 included newfeatures such as improved support for object-oriented programming, the PHP Data Objects (PDO)extension (which defines a lightweight and consistent interface for accessing databases), andnumerous performance enhancements.[22] In 2008 PHP 5 became the only stable version underdevelopment. Late static binding had been missing from PHP and was added in version 5.3.[23][24]
Many high-profile open-source projects ceased to support PHP 4 in new code as of February 5,2008, because of the GoPHP5 initiative,[25] provided by a consortium of PHP developers promotingthe transition from PHP 4 to PHP 5.[26][27]
Over time, PHP interpreters became available on most existing 32-bit and 64-bit operating systems,either by building them from the PHP source code, or by using pre-built binaries.[28] For the PHPversions 5.3 and 5.4, the only available Microsoft Windows binary distributions were 32-
bit x86 builds,[29][30] requiring Windows 32-bit compatibility mode while using Internet InformationServices (IIS) on a 64-bit Windows platform. PHP version 5.5 made the 64-bit x86-64 buildsavailable for Microsoft Windows.[31]
PHP 6 and Unicode[edit]
PHP received mixed reviews due to lacking native Unicode support at the core language level.[32][33] In2005, a project headed by Andrei Zmievski was initiated to bring native Unicode support throughoutPHP, by embedding the International Components for Unicode (ICU) library, and representing textstrings as UTF-16 internally.[34] Since this would cause major changes both to the internals of the
https://en.wikipedia.org/wiki/Web_formhttps://en.wikipedia.org/wiki/Web_formhttps://en.wikipedia.org/wiki/Web_formhttps://en.wikipedia.org/wiki/Databasehttps://en.wikipedia.org/wiki/Databasehttps://en.wikipedia.org/wiki/Databasehttps://en.wikipedia.org/wiki/Web_applicationhttps://en.wikipedia.org/wiki/Web_applicationhttps://en.wikipedia.org/wiki/Web_applicationhttps://en.wikipedia.org/wiki/Software_bughttps://en.wikipedia.org/wiki/Software_bughttps://en.wikipedia.org/wiki/Software_bughttps://en.wikipedia.org/wiki/Usenethttps://en.wikipedia.org/wiki/Usenethttps://en.wikipedia.org/wiki/Usenethttps://en.wikipedia.org/wiki/PHP#cite_note-12https://en.wikipedia.org/wiki/PHP#cite_note-12https://en.wikipedia.org/wiki/PHP#cite_note-12https://en.wikipedia.org/wiki/Local_variable#Local_variables_in_Perlhttps://en.wikipedia.org/wiki/Local_variable#Local_variables_in_Perlhttps://en.wikipedia.org/wiki/Local_variable#Local_variables_in_Perlhttps://en.wikipedia.org/wiki/Syntaxhttps://en.wikipedia.org/wiki/Syntaxhttps://en.wikipedia.org/wiki/Syntaxhttps://en.wikipedia.org/wiki/PHP#cite_note-about_PHP-4https://en.wikipedia.org/wiki/PHP#cite_note-about_PHP-4https://en.wikipedia.org/wiki/PHP#cite_note-about_PHP-4https://en.wikipedia.org/wiki/PHP#cite_note-itconversations-14https://en.wikipedia.org/wiki/PHP#cite_note-itconversations-14https://en.wikipedia.org/wiki/PHP#cite_note-itconversations-14https://en.wikipedia.org/wiki/Beta_development_stagehttps://en.wikipedia.org/wiki/Beta_development_stagehttps://en.wikipedia.org/wiki/Beta_development_stagehttps://en.wikipedia.org/wiki/PHP#cite_note-15https://en.wikipedia.org/wiki/PHP#cite_note-15https://en.wikipedia.org/wiki/PHP#cite_note-15https://en.wikipedia.org/wiki/PHP#cite_note-16https://en.wikipedia.org/wiki/PHP#cite_note-16https://en.wikipedia.org/wiki/PHP#cite_note-16https://en.wikipedia.org/wiki/Hash_functionhttps://en.wikipedia.org/wiki/Hash_functionhttps://en.wikipedia.org/wiki/Hash_functionhttps://en.wikipedia.org/wiki/Hash_functionhttps://en.wikipedia.org/wiki/PHP#cite_note-php-internals-70691-17https://en.wikipedia.org/wiki/PHP#cite_note-php-internals-70691-17https://en.wikipedia.org/wiki/PHP#cite_note-php-internals-70691-17https://en.wikipedia.org/w/index.php?title=PHP&action=edit§ion=3https://en.wikipedia.org/w/index.php?title=PHP&action=edit§ion=3https://en.wikipedia.org/w/index.php?title=PHP&action=edit§ion=3https://en.wikipedia.org/wiki/Zeev_Suraskihttps://en.wikipedia.org/wiki/Zeev_Suraskihttps://en.wikipedia.org/wiki/Andi_Gutmanshttps://en.wikipedia.org/wiki/Andi_Gutmanshttps://en.wikipedia.org/wiki/Andi_Gutmanshttps://en.wikipedia.org/wiki/Parserhttps://en.wikipedia.org/wiki/Parserhttps://en.wikipedia.org/wiki/Parserhttps://en.wikipedia.org/wiki/Recursive_acronymhttps://en.wikipedia.org/wiki/Recursive_acronymhttps://en.wikipedia.org/wiki/Recursive_acronymhttps://en.wikipedia.org/wiki/PHP#cite_note-about_PHP-4https://en.wikipedia.org/wiki/PHP#cite_note-about_PHP-4https://en.wikipedia.org/wiki/PHP#cite_note-about_PHP-4https://en.wikipedia.org/wiki/Rewrite_(programming)https://en.wikipedia.org/wiki/Rewrite_(programming)https://en.wikipedia.org/wiki/Rewrite_(programming)https://en.wikipedia.org/wiki/Zend_Enginehttps://en.wikipedia.org/wiki/Zend_Enginehttps://en.wikipedia.org/wiki/Zend_Enginehttps://en.wikipedia.org/wiki/PHP#cite_note-19https://en.wikipedia.org/wiki/PHP#cite_note-19https://en.wikipedia.org/wiki/PHP#cite_note-19https://en.wikipedia.org/wiki/Zend_Technologieshttps://en.wikipedia.org/wiki/Zend_Technologieshttps://en.wikipedia.org/wiki/Zend_Technologieshttps://en.wikipedia.org/wiki/Ramat_Ganhttps://en.wikipedia.org/wiki/Ramat_Ganhttps://en.wikipedia.org/wiki/Ramat_Ganhttps://en.wikipedia.org/wiki/PHP#cite_note-about_PHP-4https://en.wikipedia.org/wiki/PHP#cite_note-about_PHP-4https://en.wikipedia.org/wiki/PHP#cite_note-about_PHP-4https://en.wikipedia.org/wiki/PHP#cite_note-about_PHP-4https://en.wikipedia.org/wiki/PHP#cite_note-about_PHP-4https://en.wikipedia.org/wiki/PHP#cite_note-about_PHP-4https://en.wikipedia.org/wiki/PHP#cite_note-2007_news-20https://en.wikipedia.org/wiki/PHP#cite_note-2007_news-20https://en.wikipedia.org/wiki/PHP#cite_note-2007_news-20https://en.wikipedia.org/w/index.php?title=PHP&action=edit§ion=4https://en.wikipedia.org/w/index.php?title=PHP&action=edit§ion=4https://en.wikipedia.org/w/index.php?title=PHP&action=edit§ion=4https://en.wikipedia.org/wiki/PHP#cite_note-about_PHP-4https://en.wikipedia.org/wiki/PHP#cite_note-about_PHP-4https://en.wikipedia.org/wiki/PHP#cite_note-about_PHP-4https://en.wikipedia.org/wiki/Object-oriented_programminghttps://en.wikipedia.org/wiki/Object-oriented_programminghttps://en.wikipedia.org/wiki/Object-oriented_programminghttps://en.wikipedia.org/wiki/PHP#cite_note-22https://en.wikipedia.org/wiki/PHP#cite_note-22https://en.wikipedia.org/wiki/PHP#cite_note-22https://en.wikipedia.org/wiki/Late_static_bindinghttps://en.wikipedia.org/wiki/Late_static_bindinghttps://en.wikipedia.org/wiki/Late_static_bindinghttps://en.wikipedia.org/wiki/PHP#cite_note-23https://en.wikipedia.org/wiki/PHP#cite_note-23https://en.wikipedia.org/wiki/PHP#cite_note-23https://en.wikipedia.org/wiki/PHP#cite_note-gophp5_projects-25https://en.wikipedia.org/wiki/PHP#cite_note-gophp5_projects-25https://en.wikipedia.org/wiki/PHP#cite_note-gophp5_projects-25https://en.wikipedia.org/wiki/PHP#cite_note-gophp5-26https://en.wikipedia.org/wiki/PHP#cite_note-gophp5-26https://en.wikipedia.org/wiki/PHP#cite_note-gophp5-26https://en.wikipedia.org/wiki/32-bithttps://en.wikipedia.org/wiki/32-bithttps://en.wikipedia.org/wiki/32-bithttps://en.wikipedia.org/wiki/64-bithttps://en.wikipedia.org/wiki/64-bithttps://en.wikipedia.org/wiki/64-bithttps://en.wikipedia.org/wiki/PHP#cite_note-28https://en.wikipedia.org/wiki/PHP#cite_note-28https://en.wikipedia.org/wiki/PHP#cite_note-28https://en.wikipedia.org/wiki/Microsoft_Windowshttps://en.wikipedia.org/wiki/Microsoft_Windowshttps://en.wikipedia.org/wiki/Microsoft_Windowshttps://en.wikipedia.org/wiki/X86https://en.wikipedia.org/wiki/X86https://en.wikipedia.org/wiki/X86https://en.wikipedia.org/wiki/PHP#cite_note-29https://en.wikipedia.org/wiki/PHP#cite_note-29https://en.wikipedia.org/wiki/PHP#cite_note-29https://en.wikipedia.org/wiki/Internet_Information_Serviceshttps://en.wikipedia.org/wiki/Internet_Information_Serviceshttps://en.wikipedia.org/wiki/Internet_Information_Serviceshttps://en.wikipedia.org/wiki/Internet_Information_Serviceshttps://en.wikipedia.org/wiki/X86-64https://en.wikipedia.org/wiki/X86-64https://en.wikipedia.org/wiki/X86-64https://en.wikipedia.org/wiki/PHP#cite_note-31https://en.wikipedia.org/wiki/PHP#cite_note-31https://en.wikipedia.org/wiki/PHP#cite_note-31https://en.wikipedia.org/w/index.php?title=PHP&action=edit§ion=5https://en.wikipedia.org/w/index.php?title=PHP&action=edit§ion=5https://en.wikipedia.org/w/index.php?title=PHP&action=edit§ion=5https://en.wikipedia.org/wiki/Unicodehttps://en.wikipedia.org/wiki/Unicodehttps://en.wikipedia.org/wiki/Unicodehttps://en.wikipedia.org/wiki/PHP#cite_note-32https://en.wikipedia.org/wiki/PHP#cite_note-32https://en.wikipedia.org/wiki/PHP#cite_note-32https://en.wikipedia.org/wiki/International_Components_for_Unicodehttps://en.wikipedia.org/wiki/International_Components_for_Unicodehttps://en.wikipedia.org/wiki/International_Components_for_Unicodehttps://en.wikipedia.org/wiki/UTF-16https://en.wikipedia.org/wiki/UTF-16https://en.wikipedia.org/wiki/UTF-16https://en.wikipedia.org/wiki/PHP#cite_note-34https://en.wikipedia.org/wiki/PHP#cite_note-34https://en.wikipedia.org/wiki/PHP#cite_note-34https://en.wikipedia.org/wiki/PHP#cite_note-34https://en.wikipedia.org/wiki/UTF-16https://en.wikipedia.org/wiki/International_Components_for_Unicodehttps://en.wikipedia.org/wiki/PHP#cite_note-32https://en.wikipedia.org/wiki/PHP#cite_note-32https://en.wikipedia.org/wiki/Unicodehttps://en.wikipedia.org/w/index.php?title=PHP&action=edit§ion=5https://en.wikipedia.org/wiki/PHP#cite_note-31https://en.wikipedia.org/wiki/X86-64https://en.wikipedia.org/wiki/Internet_Information_Serviceshttps://en.wikipedia.org/wiki/Internet_Information_Serviceshttps://en.wikipedia.org/wiki/PHP#cite_note-29https://en.wikipedia.org/wiki/PHP#cite_note-29https://en.wikipedia.org/wiki/X86https://en.wikipedia.org/wiki/Microsoft_Windowshttps://en.wikipedia.org/wiki/PHP#cite_note-28https://en.wikipedia.org/wiki/64-bithttps://en.wikipedia.org/wiki/32-bithttps://en.wikipedia.org/wiki/PHP#cite_note-gophp5-26https://en.wikipedia.org/wiki/PHP#cite_note-gophp5-26https://en.wikipedia.org/wiki/PHP#cite_note-gophp5_projects-25https://en.wikipedia.org/wiki/PHP#cite_note-23https://en.wikipedia.org/wiki/PHP#cite_note-23https://en.wikipedia.org/wiki/Late_static_bindinghttps://en.wikipedia.org/wiki/PHP#cite_note-22https://en.wikipedia.org/wiki/Object-oriented_programminghttps://en.wikipedia.org/wiki/PHP#cite_note-about_PHP-4https://en.wikipedia.org/w/index.php?title=PHP&action=edit§ion=4https://en.wikipedia.org/wiki/PHP#cite_note-2007_news-20https://en.wikipedia.org/wiki/PHP#cite_note-2007_news-20https://en.wikipedia.org/wiki/PHP#cite_note-about_PHP-4https://en.wikipedia.org/wiki/PHP#cite_note-about_PHP-4https://en.wikipedia.org/wiki/Ramat_Ganhttps://en.wikipedia.org/wiki/Zend_Technologieshttps://en.wikipedia.org/wiki/PHP#cite_note-19https://en.wikipedia.org/wiki/Zend_Enginehttps://en.wikipedia.org/wiki/Rewrite_(programming)https://en.wikipedia.org/wiki/PHP#cite_note-about_PHP-4https://en.wikipedia.org/wiki/PHP#cite_note-about_PHP-4https://en.wikipedia.org/wiki/Recursive_acronymhttps://en.wikipedia.org/wiki/Parserhttps://en.wikipedia.org/wiki/Andi_Gutmanshttps://en.wikipedia.org/wiki/Zeev_Suraskihttps://en.wikipedia.org/w/index.php?title=PHP&action=edit§ion=3https://en.wikipedia.org/wiki/PHP#cite_note-php-internals-70691-17https://en.wikipedia.org/wiki/Hash_functionhttps://en.wikipedia.org/wiki/Hash_functionhttps://en.wikipedia.org/wiki/PHP#cite_note-16https://en.wikipedia.org/wiki/PHP#cite_note-15https://en.wikipedia.org/wiki/Beta_development_stagehttps://en.wikipedia.org/wiki/PHP#cite_note-itconversations-14https://en.wikipedia.org/wiki/PHP#cite_note-about_PHP-4https://en.wikipedia.org/wiki/Syntaxhttps://en.wikipedia.org/wiki/Local_variable#Local_variables_in_Perlhttps://en.wikipedia.org/wiki/PHP#cite_note-12https://en.wikipedia.org/wiki/PHP#cite_note-12https://en.wikipedia.org/wiki/Usenethttps://en.wikipedia.org/wiki/Software_bughttps://en.wikipedia.org/wiki/Web_applicationhttps://en.wikipedia.org/wiki/Databasehttps://en.wikipedia.org/wiki/Web_form
-
8/17/2019 Php Deep Introduction
5/19
language and to user code, it was planned to release this as version 6.0 of the language, along withother major features then in development.[35]
However, a shortage of developers who understood the necessary changes, and performanceproblems arising from conversion to and from UTF-16, which is rarely used in a web context, led todelays in the project.[36] As a result, a PHP 5.3 release was created in 2009, with many non-Unicodefeatures back-ported from PHP 6, notably namespaces. In March 2010, the project in its current form
was officially abandoned, and a PHP 5.4 release was prepared containing most remaining non-Unicode features from PHP 6, such as traits and closure re-binding.[37] Initial hopes were that a newplan would be formed for Unicode integration, but as of 2014 none have been adopted.
PHP 7[edit]
During 2014 and 2015, a new major PHP version was developed, which was numbered PHP 7. Thenumbering of this version involved some debate.[38] While the PHP 6 Unicode experiment had neverbeen released, several articles and book titles referenced the PHP 6 name, which might havecaused confusion if a new release were to reuse the name.[39] After a vote, the name PHP 7 waschosen.[40]
The foundation of PHP 7 is a PHP branch that was originally dubbed PHP next generation (phpng).It was authored by Dmitry Stogov, Xinchen Hui and Nikita Popov,[41] and aimed to optimize PHPperformance by refactoring the Zend Engine while retaining near-complete languagecompatibility.[42] As of 14 July 2014, WordPress-based benchmarks, which served as the mainbenchmark suite for the phpng project, showed an almost 100% increase in performance. Changesfrom phpng are also expected to make it easier to improve performance in the future, as morecompact data structures and other changes are seen as better suited for a successful migration toa just-in-time (JIT) compiler .[43] Because of the significant changes, the reworked Zend Engine iscalled Zend Engine 3, succeeding Zend Engine 2 used in PHP 5.[44]
Because of major internal changes in phpng, it must receive a new major version number of PHP,rather than a minor PHP 5 release, according to PHP's release process.[45] Major versions of PHPare allowed to break backward-compatibility of code and therefore PHP 7 presented an opportunityfor other improvements beyond phpng that require backward-compatibility breaks. In particular, itinvolved the following changes:
Many fatal- or recoverable-level legacy PHP error mechanisms were replaced with modernobject-oriented exceptions[46]
The syntax for variable dereferencing was reworked to be internally more consistent andcomplete, allowing the use of the operators ->, [], (), {}, and :: with arbitrary meaningful left-hand-side expressions[47]
Support for legacy PHP 4-style constructor methods was deprecated[48]
The behavior of the foreach statement was changed to be more predictable[49]
Constructors for the few classes built-in to PHP which returned null upon failure were changedto throw an exception instead, for consistency[50]
Several unmaintained or deprecated server application programming interfaces (SAPIs) andextensions were removed from the PHP core, most notably the legacy mysqlextension[51]
The behavior of the list() operator was changed to remove support for strings[52]
Support for legacy ASP-style PHP code delimiters (, and ) was removed[53]
An oversight allowing a switch statement to have multiple default clauses was fixed[54]
Support for hexadecimal number support in some implicit conversions from strings to numbertypes was removed[55]
The left-shift and right-shift operators were changed to behave more consistently acrossplatforms[56]
https://en.wikipedia.org/wiki/PHP#cite_note-35https://en.wikipedia.org/wiki/PHP#cite_note-35https://en.wikipedia.org/wiki/PHP#cite_note-35https://en.wikipedia.org/wiki/PHP#cite_note-36https://en.wikipedia.org/wiki/PHP#cite_note-36https://en.wikipedia.org/wiki/PHP#cite_note-36https://en.wikipedia.org/wiki/PHP#cite_note-37https://en.wikipedia.org/wiki/PHP#cite_note-37https://en.wikipedia.org/wiki/PHP#cite_note-37https://en.wikipedia.org/w/index.php?title=PHP&action=edit§ion=6https://en.wikipedia.org/w/index.php?title=PHP&action=edit§ion=6https://en.wikipedia.org/w/index.php?title=PHP&action=edit§ion=6https://en.wikipedia.org/wiki/PHP#cite_note-38https://en.wikipedia.org/wiki/PHP#cite_note-38https://en.wikipedia.org/wiki/PHP#cite_note-38https://en.wikipedia.org/wiki/PHP#cite_note-39https://en.wikipedia.org/wiki/PHP#cite_note-39https://en.wikipedia.org/wiki/PHP#cite_note-40https://en.wikipedia.org/wiki/PHP#cite_note-40https://en.wikipedia.org/wiki/PHP#cite_note-40https://en.wikipedia.org/wiki/Branching_(revision_control)https://en.wikipedia.org/wiki/Branching_(revision_control)https://en.wikipedia.org/wiki/Branching_(revision_control)https://en.wikipedia.org/wiki/PHP#cite_note-41https://en.wikipedia.org/wiki/PHP#cite_note-41https://en.wikipedia.org/wiki/PHP#cite_note-41https://en.wikipedia.org/wiki/PHP#cite_note-42https://en.wikipedia.org/wiki/PHP#cite_note-42https://en.wikipedia.org/wiki/PHP#cite_note-42https://en.wikipedia.org/wiki/WordPresshttps://en.wikipedia.org/wiki/WordPresshttps://en.wikipedia.org/wiki/WordPresshttps://en.wikipedia.org/wiki/Just-in-time_compilationhttps://en.wikipedia.org/wiki/Just-in-time_compilationhttps://en.wikipedia.org/wiki/Just-in-time_compilationhttps://en.wikipedia.org/wiki/PHP#cite_note-phpng-43https://en.wikipedia.org/wiki/PHP#cite_note-phpng-43https://en.wikipedia.org/wiki/PHP#cite_note-phpng-43https://en.wikipedia.org/wiki/PHP#cite_note-ZE2-44https://en.wikipedia.org/wiki/PHP#cite_note-ZE2-44https://en.wikipedia.org/wiki/PHP#cite_note-ZE2-44https://en.wikipedia.org/wiki/Software_versioninghttps://en.wikipedia.org/wiki/Software_versioninghttps://en.wikipedia.org/wiki/Software_versioninghttps://en.wikipedia.org/wiki/PHP#cite_note-releaseprocess-45https://en.wikipedia.org/wiki/PHP#cite_note-releaseprocess-45https://en.wikipedia.org/wiki/PHP#cite_note-releaseprocess-45https://en.wikipedia.org/wiki/Exception_(computer_science)https://en.wikipedia.org/wiki/Exception_(computer_science)https://en.wikipedia.org/wiki/Exception_(computer_science)https://en.wikipedia.org/wiki/Exception_(computer_science)https://en.wikipedia.org/wiki/PHP#cite_note-uvs-47https://en.wikipedia.org/wiki/PHP#cite_note-uvs-47https://en.wikipedia.org/wiki/PHP#cite_note-48https://en.wikipedia.org/wiki/PHP#cite_note-48https://en.wikipedia.org/wiki/PHP#cite_note-48https://en.wikipedia.org/wiki/Foreach_loophttps://en.wikipedia.org/wiki/Foreach_loophttps://en.wikipedia.org/wiki/Foreach_loophttps://en.wikipedia.org/wiki/Foreach_loophttps://en.wikipedia.org/wiki/PHP#cite_note-49https://en.wikipedia.org/wiki/PHP#cite_note-49https://en.wikipedia.org/wiki/PHP#cite_note-49https://en.wikipedia.org/wiki/PHP#cite_note-50https://en.wikipedia.org/wiki/PHP#cite_note-50https://en.wikipedia.org/wiki/PHP#cite_note-50https://en.wikipedia.org/wiki/Server_application_programming_interfacehttps://en.wikipedia.org/wiki/Server_application_programming_interfacehttps://en.wikipedia.org/wiki/Server_application_programming_interfacehttps://en.wikipedia.org/wiki/PHP#cite_note-51https://en.wikipedia.org/wiki/PHP#cite_note-51https://en.wikipedia.org/wiki/PHP#cite_note-52https://en.wikipedia.org/wiki/PHP#cite_note-52https://en.wikipedia.org/wiki/PHP#cite_note-52https://en.wikipedia.org/wiki/PHP#cite_note-53https://en.wikipedia.org/wiki/PHP#cite_note-53https://en.wikipedia.org/wiki/Switch_statementhttps://en.wikipedia.org/wiki/Switch_statementhttps://en.wikipedia.org/wiki/Switch_statementhttps://en.wikipedia.org/wiki/PHP#cite_note-54https://en.wikipedia.org/wiki/PHP#cite_note-54https://en.wikipedia.org/wiki/PHP#cite_note-55https://en.wikipedia.org/wiki/PHP#cite_note-55https://en.wikipedia.org/wiki/Left-shift_operatorhttps://en.wikipedia.org/wiki/Left-shift_operatorhttps://en.wikipedia.org/wiki/Left-shift_operatorhttps://en.wikipedia.org/wiki/Right-shift_operatorhttps://en.wikipedia.org/wiki/Right-shift_operatorhttps://en.wikipedia.org/wiki/Right-shift_operatorhttps://en.wikipedia.org/wiki/PHP#cite_note-integer_semantics-56https://en.wikipedia.org/wiki/PHP#cite_note-integer_semantics-56https://en.wikipedia.org/wiki/PHP#cite_note-integer_semantics-56https://en.wikipedia.org/wiki/Right-shift_operatorhttps://en.wikipedia.org/wiki/Left-shift_operatorhttps://en.wikipedia.org/wiki/PHP#cite_note-55https://en.wikipedia.org/wiki/PHP#cite_note-54https://en.wikipedia.org/wiki/Switch_statementhttps://en.wikipedia.org/wiki/PHP#cite_note-53https://en.wikipedia.org/wiki/PHP#cite_note-52https://en.wikipedia.org/wiki/PHP#cite_note-51https://en.wikipedia.org/wiki/Server_application_programming_interfacehttps://en.wikipedia.org/wiki/PHP#cite_note-50https://en.wikipedia.org/wiki/PHP#cite_note-49https://en.wikipedia.org/wiki/Foreach_loophttps://en.wikipedia.org/wiki/PHP#cite_note-48https://en.wikipedia.org/wiki/PHP#cite_note-uvs-47https://en.wikipedia.org/wiki/Exception_(computer_science)https://en.wikipedia.org/wiki/Exception_(computer_science)https://en.wikipedia.org/wiki/PHP#cite_note-releaseprocess-45https://en.wikipedia.org/wiki/Software_versioninghttps://en.wikipedia.org/wiki/PHP#cite_note-ZE2-44https://en.wikipedia.org/wiki/PHP#cite_note-phpng-43https://en.wikipedia.org/wiki/Just-in-time_compilationhttps://en.wikipedia.org/wiki/WordPresshttps://en.wikipedia.org/wiki/PHP#cite_note-42https://en.wikipedia.org/wiki/PHP#cite_note-41https://en.wikipedia.org/wiki/Branching_(revision_control)https://en.wikipedia.org/wiki/PHP#cite_note-40https://en.wikipedia.org/wiki/PHP#cite_note-39https://en.wikipedia.org/wiki/PHP#cite_note-38https://en.wikipedia.org/w/index.php?title=PHP&action=edit§ion=6https://en.wikipedia.org/wiki/PHP#cite_note-37https://en.wikipedia.org/wiki/PHP#cite_note-36https://en.wikipedia.org/wiki/PHP#cite_note-35
-
8/17/2019 Php Deep Introduction
6/19
Conversions between integers and floating point numbers were tightened and implementedmore consistently across platforms[56][57]
PHP 7 also included new language features. Most notably, it introduces return type declarations forfunctions,[58] which complement the existing parameter type declarations, and support for the scalartypes (integer, float, string, and boolean) in parameter and return type declarations.[59]
Release history[edit]
Key
Color Meaning Development
Red Old release No development
Yellow Stable release Security fixes
Green Stable release Bug and security fixes
Blue Future release New features
Ve
rsion
Rele
asedate
Sup
port
eduntil[60]
Notes
1.0
8
June
199
5
Officially called "Personal Home Page Tools (PHP Tools)". This is the first use of the
name "PHP".[4]
2.0
1
Novemb
er199
7
Officially called "PHP/FI 2.0". This is the first release that could actually becharacterised as PHP, being a standalone language with many features that have
endured to the present day.
https://en.wikipedia.org/wiki/PHP#cite_note-integer_semantics-56https://en.wikipedia.org/wiki/PHP#cite_note-integer_semantics-56https://en.wikipedia.org/wiki/PHP#cite_note-integer_semantics-56https://en.wikipedia.org/wiki/PHP#cite_note-return-types-58https://en.wikipedia.org/wiki/PHP#cite_note-return-types-58https://en.wikipedia.org/wiki/PHP#cite_note-return-types-58https://en.wikipedia.org/wiki/PHP#cite_note-scalar-types-59https://en.wikipedia.org/wiki/PHP#cite_note-scalar-types-59https://en.wikipedia.org/wiki/PHP#cite_note-scalar-types-59https://en.wikipedia.org/w/index.php?title=PHP&action=edit§ion=7https://en.wikipedia.org/w/index.php?title=PHP&action=edit§ion=7https://en.wikipedia.org/w/index.php?title=PHP&action=edit§ion=7https://en.wikipedia.org/wiki/PHP#cite_note-eol-60https://en.wikipedia.org/wiki/PHP#cite_note-eol-60https://en.wikipedia.org/wiki/PHP#cite_note-about_PHP-4https://en.wikipedia.org/wiki/PHP#cite_note-about_PHP-4https://en.wikipedia.org/wiki/PHP#cite_note-about_PHP-4https://en.wikipedia.org/wiki/PHP#cite_note-about_PHP-4https://en.wikipedia.org/wiki/PHP#cite_note-eol-60https://en.wikipedia.org/w/index.php?title=PHP&action=edit§ion=7https://en.wikipedia.org/wiki/PHP#cite_note-scalar-types-59https://en.wikipedia.org/wiki/PHP#cite_note-return-types-58https://en.wikipedia.org/wiki/PHP#cite_note-integer_semantics-56https://en.wikipedia.org/wiki/PHP#cite_note-integer_semantics-56
-
8/17/2019 Php Deep Introduction
7/19
3.0
6
June
199
8
20
Octo ber
2000[60]
Development moves from one person to multiple developers. Zeev Suraski and Andi
Gutmans rewrite the base for this version.[4]
4.0
22
May
2000
23
June
2001[60]
Added more advanced two-stage parse/execute tag-parsing system called the Zend
engine.[61]
4.1
10
Decemb
er
2001
12
March
2002[60]
Introduced "superglobals" ($_GET , $_POST , $_SESSION , etc.)[61]
4.2
22
Apri
l
200
2
6
Sept
emb
er
2002[60]
Disabled register_globals by default. Data received over the network is not
inserted directly into the globalnamespace anymore, closing possible security holes in
applications.[61]
4.3
27Dec
emb
er200
2
31Marc
h
2005[60]
Introduced the command-line interface (CLI), to supplement the CGI.[61][62]
4.4
11July
2005
7Aug
ust
2008[60]
Fixed a memory corruption bug, which required breaking binary compatibility with
extensions compiled against PHP version 4.3.x.[63]
5.0
13
July200
4
5
Septemb
er
Zend Engine II with a new object model.[64]
https://en.wikipedia.org/wiki/PHP#cite_note-eol-60https://en.wikipedia.org/wiki/PHP#cite_note-eol-60https://en.wikipedia.org/wiki/PHP#cite_note-about_PHP-4https://en.wikipedia.org/wiki/PHP#cite_note-about_PHP-4https://en.wikipedia.org/wiki/PHP#cite_note-about_PHP-4https://en.wikipedia.org/wiki/PHP#cite_note-eol-60https://en.wikipedia.org/wiki/PHP#cite_note-eol-60https://en.wikipedia.org/wiki/PHP#cite_note-php4changelog-61https://en.wikipedia.org/wiki/PHP#cite_note-php4changelog-61https://en.wikipedia.org/wiki/PHP#cite_note-php4changelog-61https://en.wikipedia.org/wiki/PHP#cite_note-eol-60https://en.wikipedia.org/wiki/PHP#cite_note-eol-60https://en.wikipedia.org/wiki/PHP#cite_note-php4changelog-61https://en.wikipedia.org/wiki/PHP#cite_note-php4changelog-61https://en.wikipedia.org/wiki/PHP#cite_note-php4changelog-61https://en.wikipedia.org/wiki/PHP#cite_note-eol-60https://en.wikipedia.org/wiki/PHP#cite_note-eol-60https://en.wikipedia.org/wiki/Global_variablehttps://en.wikipedia.org/wiki/Global_variablehttps://en.wikipedia.org/wiki/Global_variablehttps://en.wikipedia.org/wiki/PHP#cite_note-php4changelog-61https://en.wikipedia.org/wiki/PHP#cite_note-php4changelog-61https://en.wikipedia.org/wiki/PHP#cite_note-php4changelog-61https://en.wikipedia.org/wiki/PHP#cite_note-eol-60https://en.wikipedia.org/wiki/PHP#cite_note-eol-60https://en.wikipedia.org/wiki/Command-line_interfacehttps://en.wikipedia.org/wiki/Command-line_interfacehttps://en.wikipedia.org/wiki/Command-line_interfacehttps://en.wikipedia.org/wiki/PHP#cite_note-php4changelog-61https://en.wikipedia.org/wiki/PHP#cite_note-php4changelog-61https://en.wikipedia.org/wiki/PHP#cite_note-php4changelog-61https://en.wikipedia.org/wiki/PHP#cite_note-eol-60https://en.wikipedia.org/wiki/PHP#cite_note-eol-60https://en.wikipedia.org/wiki/PHP#cite_note-php44announcement-63https://en.wikipedia.org/wiki/PHP#cite_note-php44announcement-63https://en.wikipedia.org/wiki/PHP#cite_note-php44announcement-63https://en.wikipedia.org/wiki/PHP#cite_note-php5changelog-64https://en.wikipedia.org/wiki/PHP#cite_note-php5changelog-64https://en.wikipedia.org/wiki/PHP#cite_note-php5changelog-64https://en.wikipedia.org/wiki/PHP#cite_note-php5changelog-64https://en.wikipedia.org/wiki/PHP#cite_note-php44announcement-63https://en.wikipedia.org/wiki/PHP#cite_note-eol-60https://en.wikipedia.org/wiki/PHP#cite_note-php4changelog-61https://en.wikipedia.org/wiki/PHP#cite_note-php4changelog-61https://en.wikipedia.org/wiki/Command-line_interfacehttps://en.wikipedia.org/wiki/PHP#cite_note-eol-60https://en.wikipedia.org/wiki/PHP#cite_note-php4changelog-61https://en.wikipedia.org/wiki/Global_variablehttps://en.wikipedia.org/wiki/PHP#cite_note-eol-60https://en.wikipedia.org/wiki/PHP#cite_note-php4changelog-61https://en.wikipedia.org/wiki/PHP#cite_note-eol-60https://en.wikipedia.org/wiki/PHP#cite_note-php4changelog-61https://en.wikipedia.org/wiki/PHP#cite_note-eol-60https://en.wikipedia.org/wiki/PHP#cite_note-about_PHP-4https://en.wikipedia.org/wiki/PHP#cite_note-eol-60
-
8/17/2019 Php Deep Introduction
8/19
2005[60]
5.1
24
Nov
emb
er
200
5
24
August
2006[60]
Performance improvements with introduction of compiler variables in re-engineeredPHP Engine.[64] Added PHP Data Objects (PDO) as a consistent interface for accessing
databases.[65]
5.2
2
Nov
emb
er
200
6
6
Janu
ary
2011[60]
Enabled the filter extension by default. Native JSON support.[64]
5.3
30
June200
9
14
Aug
ust2014[60]
Namespace support; late static bindings, jump label (limited goto), closures, PHP
archives (phar), garbage collection for circular references, improved Windows support,
sqlite3, mysqlnd as a replacement for libmysql as underlying library for the extensionsthat work with MySQL, fileinfo as a replacement for mime_magic for
better MIME support, the Internationalization extension, and deprecation of ereg
extension.
5.4
1
Mar ch
201
2
3
Sept
ember
2015[60]
Trait support, short array syntax support. Removed
items: register_globals , safe_mode ,allow_call_time_pass_referen
ce , session_register() , session_unregister() and session_is_reg
istered() . Built-in web server .[66] Several improvements to existing features,
performance and reduced memory requirements.
5.5
20
June
201
3
10July
2016[67]
Support for generators, finally blocks for exceptions handling, OpCache (based on
Zend Optimizer+) bundled in official distribution.[68]
5.6
28
Aug
ust
2014
31
Dece
mber2018[67]
Constant scalar expressions, variadic functions, argument unpacking, new
exponentiation operator, extensions of theuse statement for functions and constants,
new phpdbg debugger as a SAPI module, and other smaller improvements.[69]
https://en.wikipedia.org/wiki/PHP#cite_note-eol-60https://en.wikipedia.org/wiki/PHP#cite_note-eol-60https://en.wikipedia.org/wiki/PHP#cite_note-eol-60https://en.wikipedia.org/wiki/PHP#cite_note-eol-60https://en.wikipedia.org/wiki/PHP#cite_note-php5changelog-64https://en.wikipedia.org/wiki/PHP#cite_note-php5changelog-64https://en.wikipedia.org/wiki/PHP#cite_note-php5changelog-64https://en.wikipedia.org/wiki/PHP#cite_note-phpPdoDocs-65https://en.wikipedia.org/wiki/PHP#cite_note-phpPdoDocs-65https://en.wikipedia.org/wiki/PHP#cite_note-phpPdoDocs-65https://en.wikipedia.org/wiki/PHP#cite_note-eol-60https://en.wikipedia.org/wiki/PHP#cite_note-eol-60https://en.wikipedia.org/wiki/JSONhttps://en.wikipedia.org/wiki/JSONhttps://en.wikipedia.org/wiki/JSONhttps://en.wikipedia.org/wiki/PHP#cite_note-php5changelog-64https://en.wikipedia.org/wiki/PHP#cite_note-php5changelog-64https://en.wikipedia.org/wiki/PHP#cite_note-php5changelog-64https://en.wikipedia.org/wiki/PHP#cite_note-eol-60https://en.wikipedia.org/wiki/PHP#cite_note-eol-60https://en.wikipedia.org/wiki/Namespacehttps://en.wikipedia.org/wiki/Namespacehttps://en.wikipedia.org/wiki/Name_bindinghttps://en.wikipedia.org/wiki/Name_bindinghttps://en.wikipedia.org/wiki/Name_bindinghttps://en.wikipedia.org/wiki/Gotohttps://en.wikipedia.org/wiki/Gotohttps://en.wikipedia.org/wiki/Gotohttps://en.wikipedia.org/wiki/Closure_(computer_science)https://en.wikipedia.org/wiki/Closure_(computer_science)https://en.wikipedia.org/wiki/Closure_(computer_science)https://en.wikipedia.org/wiki/Garbage_collection_(computer_science)https://en.wikipedia.org/wiki/Garbage_collection_(computer_science)https://en.wikipedia.org/wiki/Garbage_collection_(computer_science)https://en.wikipedia.org/wiki/Microsoft_Windowshttps://en.wikipedia.org/wiki/Microsoft_Windowshttps://en.wikipedia.org/wiki/Microsoft_Windowshttps://en.wikipedia.org/wiki/MySQLhttps://en.wikipedia.org/wiki/MySQLhttps://en.wikipedia.org/wiki/MySQLhttps://en.wikipedia.org/wiki/MIMEhttps://en.wikipedia.org/wiki/MIMEhttps://en.wikipedia.org/wiki/MIMEhttps://en.wikipedia.org/wiki/PHP#cite_note-eol-60https://en.wikipedia.org/wiki/PHP#cite_note-eol-60https://en.wikipedia.org/wiki/Trait_(computer_programming)https://en.wikipedia.org/wiki/Trait_(computer_programming)https://en.wikipedia.org/wiki/PHP#cite_note-66https://en.wikipedia.org/wiki/PHP#cite_note-66https://en.wikipedia.org/wiki/PHP#cite_note-66https://en.wikipedia.org/wiki/PHP#cite_note-supportedversions-67https://en.wikipedia.org/wiki/PHP#cite_note-supportedversions-67https://en.wikipedia.org/wiki/Generator_(computer_programming)https://en.wikipedia.org/wiki/Generator_(computer_programming)https://en.wikipedia.org/wiki/Generator_(computer_programming)https://en.wikipedia.org/wiki/PHP#cite_note-55changes-68https://en.wikipedia.org/wiki/PHP#cite_note-55changes-68https://en.wikipedia.org/wiki/PHP#cite_note-55changes-68https://en.wikipedia.org/wiki/PHP#cite_note-supportedversions-67https://en.wikipedia.org/wiki/PHP#cite_note-supportedversions-67https://en.wikipedia.org/wiki/Variadic_functionhttps://en.wikipedia.org/wiki/Variadic_functionhttps://en.wikipedia.org/wiki/Variadic_functionhttps://en.wikipedia.org/wiki/PHP#cite_note-56changes-69https://en.wikipedia.org/wiki/PHP#cite_note-56changes-69https://en.wikipedia.org/wiki/PHP#cite_note-56changes-69https://en.wikipedia.org/wiki/PHP#cite_note-56changes-69https://en.wikipedia.org/wiki/Variadic_functionhttps://en.wikipedia.org/wiki/PHP#cite_note-supportedversions-67https://en.wikipedia.org/wiki/PHP#cite_note-55changes-68https://en.wikipedia.org/wiki/Generator_(computer_programming)https://en.wikipedia.org/wiki/PHP#cite_note-supportedversions-67https://en.wikipedia.org/wiki/PHP#cite_note-66https://en.wikipedia.org/wiki/Trait_(computer_programming)https://en.wikipedia.org/wiki/PHP#cite_note-eol-60https://en.wikipedia.org/wiki/MIMEhttps://en.wikipedia.org/wiki/MySQLhttps://en.wikipedia.org/wiki/Microsoft_Windowshttps://en.wikipedia.org/wiki/Garbage_collection_(computer_science)https://en.wikipedia.org/wiki/Closure_(computer_science)https://en.wikipedia.org/wiki/Gotohttps://en.wikipedia.org/wiki/Name_bindinghttps://en.wikipedia.org/wiki/Namespacehttps://en.wikipedia.org/wiki/PHP#cite_note-eol-60https://en.wikipedia.org/wiki/PHP#cite_note-php5changelog-64https://en.wikipedia.org/wiki/JSONhttps://en.wikipedia.org/wiki/PHP#cite_note-eol-60https://en.wikipedia.org/wiki/PHP#cite_note-phpPdoDocs-65https://en.wikipedia.org/wiki/PHP#cite_note-php5changelog-64https://en.wikipedia.org/wiki/PHP#cite_note-eol-60https://en.wikipedia.org/wiki/PHP#cite_note-eol-60
-
8/17/2019 Php Deep Introduction
9/19
6.x Not
release
d
N/A Abandoned version of PHP that planned to include native Unicode support.[70][71]
7.0
3Dec
emb
er201
5[2]
3Dece
mber
2018[45]
Zend Engine 3 (performance improvements[43]
and 64-bit integer support onWindows[72]), uniform variable syntax,[47]AST- based compilation
process,[73] added Closure::call() ,[74] bitwise shift consistency across
platforms,[75] ?? (null coalesce) operator ,[76] Unicode codepoint escape syntax,[77] return
type declarations,[58] scalar type (integer, float, string and boolean)
declarations,[59] "spaceship" three-way
comparison operator ,[78] generator delegation,[79]anonymous classes,[80] simpler and more
consistently available CSPRNG API,[81] replacement of many remaining internal PHP
"errors" with the more modern exceptions,[46] and shorthand syntax for importing
multiple items from a namespace.[82]
7.1201
6
3years
after
relea
se[45]
void return type,[83] class constant visibility modifiers[84]
Beginning on June 28, 2011, the PHP Group implemented a timeline for the release of new versionsof PHP.[45] Under this system, at least one release should occur every month. Once per year, a minorrelease should occur which may include new features. Every minor release should at least besupported for two years with security and bug fixes, followed by at least one year of only securityfixes, for a total of a three-year release process for every minor release. No new features, unlesssmall and self-contained, are to be introduced into a minor release during the three-year release
process.
Mascot[edit]
The elePHPant, PHP mascot.
The mascot of the PHP project is the elePHPant, a blue elephant with the PHP logo on its side,designed by Vincent Pontier [85] in 1998.[86] The elePHPant is sometimes differently colored whenin plush toy form.
Syntax[edit] Main article: PHP syntax and semantics
https://en.wikipedia.org/wiki/PHP#cite_note-70https://en.wikipedia.org/wiki/PHP#cite_note-70https://en.wikipedia.org/wiki/PHP#cite_note-70https://en.wikipedia.org/wiki/PHP#cite_note-php7final-2https://en.wikipedia.org/wiki/PHP#cite_note-php7final-2https://en.wikipedia.org/wiki/PHP#cite_note-releaseprocess-45https://en.wikipedia.org/wiki/PHP#cite_note-releaseprocess-45https://en.wikipedia.org/wiki/PHP#cite_note-phpng-43https://en.wikipedia.org/wiki/PHP#cite_note-phpng-43https://en.wikipedia.org/wiki/PHP#cite_note-phpng-43https://en.wikipedia.org/wiki/PHP#cite_note-72https://en.wikipedia.org/wiki/PHP#cite_note-72https://en.wikipedia.org/wiki/PHP#cite_note-72https://en.wikipedia.org/wiki/PHP#cite_note-uvs-47https://en.wikipedia.org/wiki/PHP#cite_note-uvs-47https://en.wikipedia.org/wiki/PHP#cite_note-uvs-47https://en.wikipedia.org/wiki/PHP#cite_note-uvs-47https://en.wikipedia.org/wiki/PHP#cite_note-73https://en.wikipedia.org/wiki/PHP#cite_note-73https://en.wikipedia.org/wiki/PHP#cite_note-73https://en.wikipedia.org/wiki/PHP#cite_note-74https://en.wikipedia.org/wiki/PHP#cite_note-74https://en.wikipedia.org/wiki/PHP#cite_note-74https://en.wikipedia.org/wiki/PHP#cite_note-75https://en.wikipedia.org/wiki/PHP#cite_note-75https://en.wikipedia.org/wiki/PHP#cite_note-75https://en.wikipedia.org/wiki/Null_coalescing_operatorhttps://en.wikipedia.org/wiki/Null_coalescing_operatorhttps://en.wikipedia.org/wiki/Null_coalescing_operatorhttps://en.wikipedia.org/wiki/PHP#cite_note-76https://en.wikipedia.org/wiki/PHP#cite_note-76https://en.wikipedia.org/wiki/Unicodehttps://en.wikipedia.org/wiki/Unicodehttps://en.wikipedia.org/wiki/Unicodehttps://en.wikipedia.org/wiki/String_literal#Escape_sequenceshttps://en.wikipedia.org/wiki/String_literal#Escape_sequenceshttps://en.wikipedia.org/wiki/PHP#cite_note-77https://en.wikipedia.org/wiki/PHP#cite_note-77https://en.wikipedia.org/wiki/PHP#cite_note-77https://en.wikipedia.org/wiki/PHP#cite_note-return-types-58https://en.wikipedia.org/wiki/PHP#cite_note-return-types-58https://en.wikipedia.org/wiki/PHP#cite_note-return-types-58https://en.wikipedia.org/wiki/PHP#cite_note-scalar-types-59https://en.wikipedia.org/wiki/PHP#cite_note-scalar-types-59https://en.wikipedia.org/wiki/PHP#cite_note-scalar-types-59https://en.wikipedia.org/wiki/Three-way_comparisonhttps://en.wikipedia.org/wiki/Three-way_comparisonhttps://en.wikipedia.org/wiki/Three-way_comparisonhttps://en.wikipedia.org/wiki/Three-way_comparisonhttps://en.wikipedia.org/wiki/PHP#cite_note-78https://en.wikipedia.org/wiki/PHP#cite_note-78https://en.wikipedia.org/wiki/Generator_(computer_programming)https://en.wikipedia.org/wiki/Generator_(computer_programming)https://en.wikipedia.org/wiki/Generator_(computer_programming)https://en.wikipedia.org/wiki/PHP#cite_note-79https://en.wikipedia.org/wiki/PHP#cite_note-79https://en.wikipedia.org/wiki/PHP#cite_note-79https://en.wikipedia.org/wiki/PHP#cite_note-80https://en.wikipedia.org/wiki/PHP#cite_note-80https://en.wikipedia.org/wiki/PHP#cite_note-80https://en.wikipedia.org/wiki/CSPRNGhttps://en.wikipedia.org/wiki/CSPRNGhttps://en.wikipedia.org/wiki/CSPRNGhttps://en.wikipedia.org/wiki/PHP#cite_note-81https://en.wikipedia.org/wiki/PHP#cite_note-81https://en.wikipedia.org/wiki/PHP#cite_note-81https://en.wikipedia.org/wiki/Exception_(computer_science)https://en.wikipedia.org/wiki/Exception_(computer_science)https://en.wikipedia.org/wiki/PHP#cite_note-engine_exceptions-46https://en.wikipedia.org/wiki/PHP#cite_note-engine_exceptions-46https://en.wikipedia.org/wiki/PHP#cite_note-engine_exceptions-46https://en.wikipedia.org/wiki/PHP#cite_note-82https://en.wikipedia.org/wiki/PHP#cite_note-82https://en.wikipedia.org/wiki/PHP#cite_note-82https://en.wikipedia.org/wiki/PHP#cite_note-releaseprocess-45https://en.wikipedia.org/wiki/PHP#cite_note-releaseprocess-45https://en.wikipedia.org/wiki/PHP#cite_note-releaseprocess-45https://en.wikipedia.org/wiki/Void_typehttps://en.wikipedia.org/wiki/PHP#cite_note-83https://en.wikipedia.org/wiki/PHP#cite_note-83https://en.wikipedia.org/wiki/PHP#cite_note-83https://en.wikipedia.org/wiki/Information_hidinghttps://en.wikipedia.org/wiki/Information_hidinghttps://en.wikipedia.org/wiki/Information_hidinghttps://en.wikipedia.org/wiki/Information_hidinghttps://en.wikipedia.org/wiki/PHP#cite_note-releaseprocess-45https://en.wikipedia.org/wiki/PHP#cite_note-releaseprocess-45https://en.wikipedia.org/wiki/PHP#cite_note-releaseprocess-45https://en.wikipedia.org/w/index.php?title=PHP&action=edit§ion=8https://en.wikipedia.org/w/index.php?title=PHP&action=edit§ion=8https://en.wikipedia.org/w/index.php?title=PHP&action=edit§ion=8https://en.wikipedia.org/wiki/Elephanthttps://en.wikipedia.org/wiki/Elephanthttps://en.wikipedia.org/wiki/Elephanthttps://en.wikipedia.org/wiki/PHP#cite_note-85https://en.wikipedia.org/wiki/PHP#cite_note-85https://en.wikipedia.org/wiki/PHP#cite_note-85https://en.wikipedia.org/wiki/PHP#cite_note-86https://en.wikipedia.org/wiki/PHP#cite_note-86https://en.wikipedia.org/wiki/PHP#cite_note-86https://en.wikipedia.org/wiki/Plush_toyhttps://en.wikipedia.org/wiki/Plush_toyhttps://en.wikipedia.org/wiki/Plush_toyhttps://en.wikipedia.org/w/index.php?title=PHP&action=edit§ion=9https://en.wikipedia.org/w/index.php?title=PHP&action=edit§ion=9https://en.wikipedia.org/w/index.php?title=PHP&action=edit§ion=9https://en.wikipedia.org/wiki/PHP_syntax_and_semanticshttps://en.wikipedia.org/wiki/PHP_syntax_and_semanticshttps://en.wikipedia.org/wiki/PHP_syntax_and_semanticshttps://en.wikipedia.org/wiki/File:Webysther_20160423_-_Elephpant.svghttps://en.wikipedia.org/wiki/PHP_syntax_and_semanticshttps://en.wikipedia.org/w/index.php?title=PHP&action=edit§ion=9https://en.wikipedia.org/wiki/Plush_toyhttps://en.wikipedia.org/wiki/PHP#cite_note-86https://en.wikipedia.org/wiki/PHP#cite_note-85https://en.wikipedia.org/wiki/Elephanthttps://en.wikipedia.org/w/index.php?title=PHP&action=edit§ion=8https://en.wikipedia.org/wiki/PHP#cite_note-releaseprocess-45https://en.wikipedia.org/wiki/Information_hidinghttps://en.wikipedia.org/wiki/Information_hidinghttps://en.wikipedia.org/wiki/PHP#cite_note-83https://en.wikipedia.org/wiki/Void_typehttps://en.wikipedia.org/wiki/PHP#cite_note-releaseprocess-45https://en.wikipedia.org/wiki/PHP#cite_note-82https://en.wikipedia.org/wiki/PHP#cite_note-engine_exceptions-46https://en.wikipedia.org/wiki/Exception_(computer_science)https://en.wikipedia.org/wiki/PHP#cite_note-81https://en.wikipedia.org/wiki/CSPRNGhttps://en.wikipedia.org/wiki/PHP#cite_note-80https://en.wikipedia.org/wiki/PHP#cite_note-79https://en.wikipedia.org/wiki/PHP#cite_note-79https://en.wikipedia.org/wiki/Generator_(computer_programming)https://en.wikipedia.org/wiki/PHP#cite_note-78https://en.wikipedia.org/wiki/Three-way_comparisonhttps://en.wikipedia.org/wiki/Three-way_comparisonhttps://en.wikipedia.org/wiki/PHP#cite_note-scalar-types-59https://en.wikipedia.org/wiki/PHP#cite_note-return-types-58https://en.wikipedia.org/wiki/PHP#cite_note-77https://en.wikipedia.org/wiki/String_literal#Escape_sequenceshttps://en.wikipedia.org/wiki/Unicodehttps://en.wikipedia.org/wiki/PHP#cite_note-76https://en.wikipedia.org/wiki/Null_coalescing_operatorhttps://en.wikipedia.org/wiki/PHP#cite_note-75https://en.wikipedia.org/wiki/PHP#cite_note-74https://en.wikipedia.org/wiki/PHP#cite_note-73https://en.wikipedia.org/wiki/PHP#cite_note-uvs-47https://en.wikipedia.org/wiki/PHP#cite_note-uvs-47https://en.wikipedia.org/wiki/PHP#cite_note-72https://en.wikipedia.org/wiki/PHP#cite_note-phpng-43https://en.wikipedia.org/wiki/PHP#cite_note-releaseprocess-45https://en.wikipedia.org/wiki/PHP#cite_note-php7final-2https://en.wikipedia.org/wiki/PHP#cite_note-70https://en.wikipedia.org/wiki/PHP#cite_note-70
-
8/17/2019 Php Deep Introduction
10/19
The following "Hello, World!" program is written in PHP code embedded in an HTML document:
PHP Test
However, as no requirement exists for PHP code to be embedded in HTML, the simplest versionof Hello, World! may be written like this, with the closing tag omitted as preferred in files containingpure PHP code[87]
to close PHP sections. The shortenedform , in XHTML and other XML documents, creates correctlyformed XML processing instructions.[94] This means that the resulting mixture of PHP code and othermarkup in the server-side file is itself well-formed XML.
Variables are prefixed with a dollar symbol, and a type does not need to be specified in advance.PHP 5 introduced type hinting that allows functions to force their parameters to be objects of aspecific class, arrays, interfaces or callback functions. However, before PHP 7.0, type hints could notbe used with scalar types such as integer or string.[59]
Unlike function and class names, variable names are case sensitive. Both double-quoted ("")and heredoc strings provide the ability to interpolate a variable's value into the string.[95]PHPtreats newlines as whitespace in the manner of a free-form language, and statements are terminated
by a semicolon.
[96]
PHP has three types of comment syntax: /* */marks block and inlinecomments; // as well as # are used for one-line comments.[97] The echo statement is one of
several facilities PHP provides to output text, e.g., to a web browser.
In terms of keywords and language syntax, PHP is similar to the C stylesyntax. if conditions, for and while loops, and function returns are similar in syntax to languages suchas C, C++, C#, Java and Perl.
Data types[edit]
https://en.wikipedia.org/wiki/%22Hello,_World!%22_programhttps://en.wikipedia.org/wiki/%22Hello,_World!%22_programhttps://en.wikipedia.org/wiki/%22Hello,_World!%22_programhttps://en.wikipedia.org/wiki/HTMLhttps://en.wikipedia.org/wiki/HTMLhttps://en.wikipedia.org/wiki/HTMLhttps://en.wikipedia.org/wiki/PHP#cite_note-87https://en.wikipedia.org/wiki/PHP#cite_note-87https://en.wikipedia.org/wiki/PHP#cite_note-87https://en.wikipedia.org/wiki/Delimiterhttps://en.wikipedia.org/wiki/Delimiterhttps://en.wikipedia.org/wiki/Delimiterhttps://en.wikipedia.org/wiki/Control_structurehttps://en.wikipedia.org/wiki/Control_structurehttps://en.wikipedia.org/wiki/Control_structurehttps://en.wikipedia.org/wiki/PHP#cite_note-rfc-shortags-88https://en.wikipedia.org/wiki/PHP#cite_note-rfc-shortags-88https://en.wikipedia.org/wiki/PHP#cite_note-rfc-shortags-88https://en.wikipedia.org/wiki/PHP#cite_note-90https://en.wikipedia.org/wiki/PHP#cite_note-90https://en.wikipedia.org/wiki/PHP#cite_note-90https://en.wikipedia.org/wiki/PHP#cite_note-91https://en.wikipedia.org/wiki/PHP#cite_note-91https://en.wikipedia.org/wiki/PHP#cite_note-rfc-shortags-88https://en.wikipedia.org/wiki/PHP#cite_note-rfc-shortags-88https://en.wikipedia.org/wiki/JavaScripthttps://en.wikipedia.org/wiki/JavaScripthttps://en.wikipedia.org/wiki/JavaScripthttps://en.wikipedia.org/wiki/PHP#cite_note-93https://en.wikipedia.org/wiki/PHP#cite_note-93https://en.wikipedia.org/wiki/PHP#cite_note-93https://en.wikipedia.org/wiki/XHTMLhttps://en.wikipedia.org/wiki/XHTMLhttps://en.wikipedia.org/wiki/XHTMLhttps://en.wikipedia.org/wiki/XMLhttps://en.wikipedia.org/wiki/XMLhttps://en.wikipedia.org/wiki/XMLhttps://en.wikipedia.org/wiki/PHP#cite_note-94https://en.wikipedia.org/wiki/PHP#cite_note-94https://en.wikipedia.org/wiki/PHP#cite_note-94https://en.wikipedia.org/wiki/Dollar_signhttps://en.wikipedia.org/wiki/Dollar_signhttps://en.wikipedia.org/wiki/Dollar_signhttps://en.wikipedia.org/wiki/Primitive_typehttps://en.wikipedia.org/wiki/Primitive_typehttps://en.wikipedia.org/wiki/Primitive_typehttps://en.wikipedia.org/wiki/Callback_functionhttps://en.wikipedia.org/wiki/Callback_functionhttps://en.wikipedia.org/wiki/Callback_functionhttps://en.wikipedia.org/wiki/PHP#cite_note-scalar-types-59https://en.wikipedia.org/wiki/PHP#cite_note-scalar-types-59https://en.wikipedia.org/wiki/PHP#cite_note-scalar-types-59https://en.wikipedia.org/wiki/Heredochttps://en.wikipedia.org/wiki/Heredochttps://en.wikipedia.org/wiki/Heredochttps://en.wikipedia.org/wiki/PHP#cite_note-95https://en.wikipedia.org/wiki/PHP#cite_note-95https://en.wikipedia.org/wiki/Newlinehttps://en.wikipedia.org/wiki/Newlinehttps://en.wikipedia.org/wiki/Newlinehttps://en.wikipedia.org/wiki/Whitespace_characterhttps://en.wikipedia.org/wiki/Whitespace_characterhttps://en.wikipedia.org/wiki/Whitespace_characterhttps://en.wikipedia.org/wiki/Free-form_languagehttps://en.wikipedia.org/wiki/Free-form_languagehttps://en.wikipedia.org/wiki/Free-form_languagehttps://en.wikipedia.org/wiki/PHP#cite_note-96https://en.wikipedia.org/wiki/PHP#cite_note-96https://en.wikipedia.org/wiki/PHP#cite_note-96https://en.wikipedia.org/wiki/Comparison_of_programming_languages_(syntax)#Commentshttps://en.wikipedia.org/wiki/Comparison_of_programming_languages_(syntax)#Commentshttps://en.wikipedia.org/wiki/Comparison_of_programming_languages_(syntax)#Commentshttps://en.wikipedia.org/wiki/PHP#cite_note-97https://en.wikipedia.org/wiki/PHP#cite_note-97https://en.wikipedia.org/wiki/PHP#cite_note-97https://en.wikipedia.org/w/index.php?title=PHP&action=edit§ion=10https://en.wikipedia.org/w/index.php?title=PHP&action=edit§ion=10https://en.wikipedia.org/w/index.php?title=PHP&action=edit§ion=10https://en.wikipedia.org/w/index.php?title=PHP&action=edit§ion=10https://en.wikipedia.org/wiki/PHP#cite_note-97https://en.wikipedia.org/wiki/Comparison_of_programming_languages_(syntax)#Commentshttps://en.wikipedia.org/wiki/PHP#cite_note-96https://en.wikipedia.org/wiki/Free-form_languagehttps://en.wikipedia.org/wiki/Whitespace_characterhttps://en.wikipedia.org/wiki/Newlinehttps://en.wikipedia.org/wiki/PHP#cite_note-95https://en.wikipedia.org/wiki/Heredochttps://en.wikipedia.org/wiki/PHP#cite_note-scalar-types-59https://en.wikipedia.org/wiki/Callback_functionhttps://en.wikipedia.org/wiki/Primitive_typehttps://en.wikipedia.org/wiki/Dollar_signhttps://en.wikipedia.org/wiki/PHP#cite_note-94https://en.wikipedia.org/wiki/XMLhttps://en.wikipedia.org/wiki/XHTMLhttps://en.wikipedia.org/wiki/PHP#cite_note-93https://en.wikipedia.org/wiki/JavaScripthttps://en.wikipedia.org/wiki/PHP#cite_note-rfc-shortags-88https://en.wikipedia.org/wiki/PHP#cite_note-91https://en.wikipedia.org/wiki/PHP#cite_note-91https://en.wikipedia.org/wiki/PHP#cite_note-90https://en.wikipedia.org/wiki/PHP#cite_note-rfc-shortags-88https://en.wikipedia.org/wiki/PHP#cite_note-rfc-shortags-88https://en.wikipedia.org/wiki/Control_structurehttps://en.wikipedia.org/wiki/Delimiterhttps://en.wikipedia.org/wiki/PHP#cite_note-87https://en.wikipedia.org/wiki/HTMLhttps://en.wikipedia.org/wiki/%22Hello,_World!%22_program
-
8/17/2019 Php Deep Introduction
11/19
PHP stores whole numbers in a platform-dependent range, either a 64-bit or 32-bit signed integer equivalent to the C-language long type. Unsigned integers are converted to signedvalues in certain situations; this behavior is different from other programming languages.[98] Integervariables can be assigned using decimal (positive and negative), octal,hexadecimal, and binary notations.
Floating point numbers are also stored in a platform-specific range. They can be specified using
floating point notation, or two forms of scientific notation.[99] PHP has a nativeBoolean type that issimilar to the native Boolean types in Java and C++. Using the Boolean type conversion rules, non-zero values are interpreted as true and zero as false, as inPerl and C++.[99]
The null data type represents a variable that has no value; NULL is the only allowed value for this
data type.[99]
Variables of the "resource" type represent references to resources from external sources. These aretypically created by functions from a particular extension, and can only be processed by functionsfrom the same extension; examples include file, image, and database resources.[99]
Arrays can contain elements of any type that PHP can handle, including resources, objects, andeven other arrays. Order is preserved in lists of values and in hashes with both keys and values, andthe two can be intermingled.[99] PHP also supports strings, which can be used with single quotes,double quotes, nowdoc or heredoc syntax.[100]
The Standard PHP Library (SPL) attempts to solve standard problems and implements efficient dataaccess interfaces and classes.[101]
Functions[edit]
PHP defines a large array of functions in the core language and many are also available in variousextensions; these functions are well documented in the online PHP documentation .[102] However, thebuilt-in library has a wide variety of naming conventions and associated inconsistencies, asdescribed under history above.
Custom functions may be defined by the developer, e.g.:
function myAge($birthYear) { // defines a
function, this one is named "myAge"
$yearsOld = date('Y') - $birthYear; // calculates
the age
return $yearsOld . ' year' . ($yearsOld != 1 ? 's' : ''); // returns the
age in a descriptive form
}
echo 'I am currently ' . myAge(1981) . ' old.'; // outputs the
text concatenated // with the
return value of myAge()
// As the result of this syntax, myAge() is called.
In 2016, the output of the above sample program is 'I am currently 35 years old.'
https://en.wikipedia.org/wiki/Signed_number_representationshttps://en.wikipedia.org/wiki/Signed_number_representationshttps://en.wikipedia.org/wiki/Integer_(computer_science)https://en.wikipedia.org/wiki/Integer_(computer_science)https://en.wikipedia.org/wiki/Integer_(computer_science)https://en.wikipedia.org/wiki/C_variable_types_and_declarationshttps://en.wikipedia.org/wiki/C_variable_types_and_declarationshttps://en.wikipedia.org/wiki/C_variable_types_and_declarationshttps://en.wikipedia.org/wiki/PHP#cite_note-98https://en.wikipedia.org/wiki/PHP#cite_note-98https://en.wikipedia.org/wiki/PHP#cite_note-98https://en.wikipedia.org/wiki/Octalhttps://en.wikipedia.org/wiki/Octalhttps://en.wikipedia.org/wiki/Hexadecimalhttps://en.wikipedia.org/wiki/Hexadecimalhttps://en.wikipedia.org/wiki/Hexadecimalhttps://en.wikipedia.org/wiki/Binary_codehttps://en.wikipedia.org/wiki/Binary_codehttps://en.wikipedia.org/wiki/Binary_codehttps://en.wikipedia.org/wiki/Floating_pointhttps://en.wikipedia.org/wiki/Floating_pointhttps://en.wikipedia.org/wiki/Scientific_notationhttps://en.wikipedia.org/wiki/Scientific_notationhttps://en.wikipedia.org/wiki/PHP#cite_note-types-99https://en.wikipedia.org/wiki/PHP#cite_note-types-99https://en.wikipedia.org/wiki/PHP#cite_note-types-99https://en.wikipedia.org/wiki/Boolean_datatypehttps://en.wikipedia.org/wiki/Boolean_datatypehttps://en.wikipedia.org/wiki/Java_(programming_language)https://en.wikipedia.org/wiki/Java_(programming_language)https://en.wikipedia.org/wiki/Java_(programming_language)https://en.wikipedia.org/wiki/C%2B%2Bhttps://en.wikipedia.org/wiki/C%2B%2Bhttps://en.wikipedia.org/wiki/C%2B%2Bhttps://en.wikipedia.org/wiki/Perlhttps://en.wikipedia.org/wiki/Perlhttps://en.wikipedia.org/wiki/Perlhttps://en.wikipedia.org/wiki/PHP#cite_note-types-99https://en.wikipedia.org/wiki/PHP#cite_note-types-99https://en.wikipedia.org/wiki/PHP#cite_note-types-99https://en.wikipedia.org/wiki/PHP#cite_note-types-99https://en.wikipedia.org/wiki/PHP#cite_note-types-99https://en.wikipedia.org/wiki/PHP#cite_note-types-99https://en.wikipedia.org/wiki/PHP#cite_note-types-99https://en.wikipedia.org/wiki/PHP#cite_note-types-99https://en.wikipedia.org/wiki/PHP#cite_note-types-99https://en.wikipedia.org/wiki/Hash_tablehttps://en.wikipedia.org/wiki/Hash_tablehttps://en.wikipedia.org/wiki/Hash_tablehttps://en.wikipedia.org/wiki/PHP#cite_note-types-99https://en.wikipedia.org/wiki/PHP#cite_note-types-99https://en.wikipedia.org/wiki/PHP#cite_note-types-99https://en.wikipedia.org/wiki/String_(computing)https://en.wikipedia.org/wiki/String_(computing)https://en.wikipedia.org/wiki/String_(computing)https://en.wikipedia.org/wiki/Heredochttps://en.wikipedia.org/wiki/Heredochttps://en.wikipedia.org/wiki/Heredochttps://en.wikipedia.org/wiki/PHP#cite_note-100https://en.wikipedia.org/wiki/PHP#cite_note-100https://en.wikipedia.org/wiki/PHP#cite_note-100https://en.wikipedia.org/wiki/PHP#cite_note-101https://en.wikipedia.org/wiki/PHP#cite_note-101https://en.wikipedia.org/wiki/PHP#cite_note-101https://en.wikipedia.org/w/index.php?title=PHP&action=edit§ion=11https://en.wikipedia.org/w/index.php?title=PHP&action=edit§ion=11https://en.wikipedia.org/w/index.php?title=PHP&action=edit§ion=11https://en.wikipedia.org/wiki/PHP#cite_note-functions-102https://en.wikipedia.org/wiki/PHP#cite_note-functions-102https://en.wikipedia.org/wiki/PHP#cite_note-functions-102https://en.wikipedia.org/wiki/PHP#ORGANIChttps://en.wikipedia.org/wiki/PHP#ORGANIChttps://en.wikipedia.org/wiki/PHP#ORGANIChttps://en.wikipedia.org/wiki/PHP#ORGANIChttps://en.wikipedia.org/wiki/PHP#cite_note-functions-102https://en.wikipedia.org/w/index.php?title=PHP&action=edit§ion=11https://en.wikipedia.org/wiki/PHP#cite_note-101https://en.wikipedia.org/wiki/PHP#cite_note-100https://en.wikipedia.org/wiki/Heredochttps://en.wikipedia.org/wiki/String_(computing)https://en.wikipedia.org/wiki/PHP#cite_note-types-99https://en.wikipedia.org/wiki/Hash_tablehttps://en.wikipedia.org/wiki/PHP#cite_note-types-99https://en.wikipedia.org/wiki/PHP#cite_note-types-99https://en.wikipedia.org/wiki/PHP#cite_note-types-99https://en.wikipedia.org/wiki/Perlhttps://en.wikipedia.org/wiki/C%2B%2Bhttps://en.wikipedia.org/wiki/Java_(programming_language)https://en.wikipedia.org/wiki/Boolean_datatypehttps://en.wikipedia.org/wiki/PHP#cite_note-types-99https://en.wikipedia.org/wiki/Scientific_notationhttps://en.wikipedia.org/wiki/Floating_pointhttps://en.wikipedia.org/wiki/Binary_codehttps://en.wikipedia.org/wiki/Hexadecimalhttps://en.wikipedia.org/wiki/Octalhttps://en.wikipedia.org/wiki/PHP#cite_note-98https://en.wikipedia.org/wiki/C_variable_types_and_declarationshttps://en.wikipedia.org/wiki/Integer_(computer_science)https://en.wikipedia.org/wiki/Signed_number_representations
-
8/17/2019 Php Deep Introduction
12/19
In lieu of function pointers, functions in PHP can be referenced by a string containing their name. Inthis manner, normal PHP functions can be used, for example, as callbacks or within functiontables.[103] User-defined functions may be created at any time withoutbeing prototyped.[102][103] Functions may be defined inside code blocks, permitting a run-time
decision as to whether or not a function should be defined. There is a function_exists function
that determines whether a function with a given name has already been defined. Function calls must
use parentheses, with the exception of zero-argument class constructor functions called with thePHP operator new, in which case parentheses are optional.
Until PHP 5.3, support for anonymous functions and closures did not exist in PHP.
While create_function() exists since PHP 4.0.1, it is merely a thin wrapper around eval() that
allows normal PHP functions to be created during program execution.[104] PHP 5.3 added syntax todefine an anonymous function or "closure"[105] which can capture variables from the surroundingscope:
function getAdder($x) {
return function($y) use ($x) {
return $x + $y;
};
}
$adder = getAdder(8);
echo $adder(2); // prints "10"
In the example above, getAdder() function creates a closure using passed argument $x (the
keyword use imports a variable from the lexical context), which takes an additional argument $y ,
and returns the created closure to the caller. Such a function is a first-class object, meaning that itcan be stored in a variable, passed as a parameter to other functions, etc.[106]
Unusually for a dynamically typed language, PHP supports type declarations on functionparameters, which are enforced at runtime. This has been supported for classes and interfacessince PHP 5.0, for arrays since PHP 5.1, for "callables" since PHP 5.4, and scalar (integer, float,string and boolean) types since PHP 7.0.[59] PHP 7.0 also has type declarations for function returntypes, expressed by placing the type name after the list of parameters, preceded by a colon.[58] For
example, the getAdder function from the earlier example could be annotated with types like so in
PHP 7:
function getAdder(int $x): \Closure {
return function(int $y) use ($x) : int {
return $x + $y;};
}
$adder = getAdder(8);
echo $adder(2); // prints "10"
https://en.wikipedia.org/wiki/Function_pointerhttps://en.wikipedia.org/wiki/Function_pointerhttps://en.wikipedia.org/wiki/Function_pointerhttps://en.wikipedia.org/wiki/Callback_functionhttps://en.wikipedia.org/wiki/Callback_functionhttps://en.wikipedia.org/wiki/Callback_functionhttps://en.wikipedia.org/wiki/Function_tablehttps://en.wikipedia.org/wiki/Function_tablehttps://en.wikipedia.org/wiki/Function_tablehttps://en.wikipedia.org/wiki/PHP#cite_note-variable-functions-103https://en.wikipedia.org/wiki/PHP#cite_note-variable-functions-103https://en.wikipedia.org/wiki/PHP#cite_note-variable-functions-103https://en.wikipedia.org/wiki/Function_prototypehttps://en.wikipedia.org/wiki/Function_prototypehttps://en.wikipedia.org/wiki/PHP#cite_note-functions-102https://en.wikipedia.org/wiki/PHP#cite_note-functions-102https:/