| PHP | |
|---|---|
| Paradigm | imperative, object-oriented |
| Appeared in | 1995 |
| Designed by | Rasmus Lerdorf |
| Developer | The PHP Group |
| Latest release | 5. A programming paradigm is a fundamental style of Computer programming. In Computer science, imperative programming is a Programming paradigm that describes computation in terms of statements that change a program state Object-oriented programming (OOP is a Programming paradigm that uses " objects " and their interactions to design applications and computer programs Rasmus Lerdorf (born November 22 1968 in Qeqertarsuaq, Greenland) is a Danish - Greenlandic Programmer and A software developer is a person or organization concerned with facets of the software development process wider than design and coding a somewhat broader scope of A software release is the distribution whether public or private of an initial or new and upgraded version of a Computer software product 2. 6/ May 1, 2008 |
| Latest unstable release | 5. Events 305 - Diocletian and Maximian retire from the office of Roman Emperor. 2008 ( MMVIII) is the current year in accordance with the Gregorian calendar, a Leap year that started on Tuesday of the Common 3. 0-dev and 6. 0-dev[1] |
| Typing discipline | Dynamic, weak |
| Major implementations | Roadsend PHP, Phalanger, Quercus, Project Zero |
| Influenced by | C, Perl, Java, C++, C#, Python |
| Influenced | Php4delphi |
| OS | Cross-platform |
| License | PHP License |
| Website | http://php.net/ |
PHP (a recursive acronym for PHP: Hypertext Preprocessor)[2] is a computer scripting language, originally designed for producing dynamic web pages. In Computer science, a type system defines how a Programming language classifies values and expressions into '''types''', how it can Implementation is the realization of an application or execution of a Plan, idea Model, Design, Specification, standard, Algorithm Roadsend PHP is an alternative implementation of the PHP programming language. Phalanger is a project which was started at Charles University and is supported by Microsoft. tags please moot on the talk page first! --> In Computing, C is a general-purpose cross-platform block structured NOTES FOR EDITORS "Perl" is not an acronym (read the "Name" section below C# (pronounced C Sharp is a Multi-paradigm Python is a general-purpose High-level programming language. Its design philosophy emphasizes programmer productivity and code readability PHP4Delphi is a Visual Development Framework for creating custom PHP Extensions using Delphi. An operating system (commonly abbreviated OS and O/S) is the software component of a Computer system that is responsible for the management and coordination In computing cross-platform (also known as multi-platform) is a term used to refer to Computer software or computing methods and concepts that are implemented A software license (or software licence in commonwealth usage is a Legal instrument governing the usage or redistribution of copyright protected software The PHP License is the Software license under which the PHP programming language is released A website (alternatively web site or Web site, a back-construction from the Proper noun World Wide Web) is a collection of Web pages A recursive acronym (or occasionally recursive initialism, and sometimes recursive backronym) is an Abbreviation that refers to itself in the "Scripting" redirects here For other uses see Script. Classical Hypertext navigation occurs among It is for server-side scripting, but can be used from a command line interface or in standalone graphical applications. Server-side scripting is a Web server technology in which a user's request is fulfilled by running a script directly on the web server to generate dynamic HTML pages [3]
While PHP was originally created by Rasmus Lerdorf in 1995, the main implementation of PHP is now produced by The PHP Group and serves as the de facto standard for PHP as there is no formal specification. Rasmus Lerdorf (born November 22 1968 in Qeqertarsuaq, Greenland) is a Danish - Greenlandic Programmer and A de facto standard is a Standard (formal or informal that has achieved a dominant and accepted position A formal specification is a mathematical description of Software or Hardware that may be used to develop an Implementation. [4] Released under the PHP License, the Free Software Foundation considers it to be free software. The PHP License is the Software license under which the PHP programming language is released The Free Software Foundation ( FSF) is a Non-profit corporation founded by Richard Stallman on 4 October 1985 to support the Free software movement Free software or software libre is Software that can be used studied and modified without restriction and which can be copied and redistributed in modified or unmodified [5]
PHP is a widely-used general-purpose scripting language that is especially suited for web development and can be embedded into HTML. Web development is a broad term for any activity related to developing a Web site for the World Wide Web or an Intranet. HTML, an initialism of HyperText Markup Language, is the predominant Markup language for Web pages It provides a means to describe the structure It generally runs on a web server, taking PHP code as its input and creating web pages as output. The term web server can mean one of two things A Computer program that is responsible for accepting HTTP requests from web clients which are A web page or webpage is a resource of information that is suitable for the World Wide Web and can be accessed through a Web browser. It can be deployed on most web servers and on almost every operating system and platform free of charge. An operating system (commonly abbreviated OS and O/S) is the software component of a Computer system that is responsible for the management and coordination In Computing, a platform describes some sort of Hardware architecture or Software framework (including Application frameworks, that allows [6] PHP is installed on more than 20 million websites and 1 million servers. A server is a Computer dedicated to providing one or more services over a computer network typically through a request-response routine It is also the most popular Apache module among computers using Apache as a web server. [7] The most recent major release of PHP was version 5. 2. 6 on May 1, 2008. Events 305 - Diocletian and Maximian retire from the office of Roman Emperor. 2008 ( MMVIII) is the current year in accordance with the Gregorian calendar, a Leap year that started on Tuesday of the Common [8]
Contents |
Rasmus Lerdorf, who wrote the original Common Gateway Interface binaries, and Andi Gutmans, who, along with Zeev Suraski, rewrote the parser that formed PHP 3 | ||
PHP originally stood for Personal Home Page. Rasmus Lerdorf (born November 22 1968 in Qeqertarsuaq, Greenland) is a Danish - Greenlandic Programmer and The Common Gateway Interface ( CGI) is a standard protocol for interfacing external Application software with an information server Andi Gutmans (אנדי גוטמנס is an Israeli Programmer with Swiss roots PHP developer and co-founder of Zend Technologies. Zeev Suraski (זאב סורסקי is an Israeli Programmer, PHP developer and co-founder of Zend Technologies. In Computer science and Linguistics, parsing, or more formally syntactic analysis, is the process of analyzing a sequence of tokens to It began in 1994 as a set of Common Gateway Interface binaries written in the C programming language by the Danish/Greenlandic programmer Rasmus Lerdorf. The Common Gateway Interface ( CGI) is a standard protocol for interfacing external Application software with an information server tags please moot on the talk page first! --> In Computing, C is a general-purpose cross-platform block structured The term Dane may refer to People with a Danish ancestral or ethnic identity whether living in Denmark, emigrants or the descendants of emigrants Greenland (Kalaallit Nunaat meaning "Land of the Greenlanders" Grønland is a self-governing Danish Province located between the Rasmus Lerdorf (born November 22 1968 in Qeqertarsuaq, Greenland) is a Danish - Greenlandic Programmer and Lerdorf initially created these Personal Home Page Tools to replace a small set of Perl scripts he had been using to maintain his personal homepage. NOTES FOR EDITORS "Perl" is not an acronym (read the "Name" section below Personal web pages are World Wide Web pages created by an individual to contain content of a personal nature The tools were used to perform tasks such as displaying his résumé and recording how much traffic his page was receiving. Web traffic is the amount of data sent and received by visitors to a Web site. [4] He combined these binaries with his Form Interpreter to create PHP/FI, which had more functionality. PHP/FI included a larger C implementation and could communicate with databases enabling the building of simple, dynamic web applications. tags please moot on the talk page first! --> In Computing, C is a general-purpose cross-platform block structured A Computer Database is a structured collection of records or data that is stored in a computer system In Software engineering, a web application or webapp is an application that is accessed via Web browser over a network such as the Internet He released PHP publicly on June 8, 1995 to speed up the finding of bugs and improving the code. Events 68 - The Roman Senate accepts emperor Galba. 536 - St Silverius becomes Pope (probable Year 1995 ( MCMXCV) was a Common year starting on Sunday. Events of 1995 A software bug (or just “bug” is an error flaw mistake Failure, fault or “undocumented feature” in a Computer program that prevents it [9] This release was named PHP version 2 and already had the basic functionality that PHP has today. This included Perl-like variables, form handling, and the ability to embed HTML. The syntax was similar to Perl but was more limited, simpler, and less consistent. [4]
Zeev Suraski and Andi Gutmans, two Israeli developers at the Technion IIT, rewrote the parser in 1997 and formed the base of PHP 3, changing the language's name to the recursive initialism PHP: Hypertext Preprocessor. Zeev Suraski (זאב סורסקי is an Israeli Programmer, PHP developer and co-founder of Zend Technologies. Andi Gutmans (אנדי גוטמנס is an Israeli Programmer with Swiss roots PHP developer and co-founder of Zend Technologies. The Technion &ndash Israel Institute of Technology (הטכניון &ndash מכון טכנולוגי לישראל is an internationally-acclaimed Institute of technology in In Computer science and Linguistics, parsing, or more formally syntactic analysis, is the process of analyzing a sequence of tokens to A recursive acronym (or occasionally recursive initialism, and sometimes recursive backronym) is an Abbreviation that refers to itself in the [4] The development team officially released PHP/FI 2 in November 1997 after months of beta testing. A software release is the distribution whether public or private of an initial or new and upgraded version of a Computer software product Afterwards, public testing of PHP 3 began, and the official launch came in June 1998. Suraski and Gutmans then started a new rewrite of PHP's core, producing the Zend Engine in 1999. A rewrite in Computer programming is the act or result of re-implementing a large portion of existing functionality without re-use of its Source code. The Zend Engine is an Open source Scripting engine (a Virtual Machine) commonly known for the important role it plays in the web automation language [10] They also founded Zend Technologies in Ramat Gan, Israel, which manages the development of PHP. Zend Technologies Ltd is a World wide web infrastructure software company with Headquarters in Cupertino, California, U Ramat Gan (רָמַת גַּן is a city in the Tel Aviv district of Israel, which borders Tel Aviv to its west [4]
On May 22, 2000, PHP 4, powered by the Zend Engine 1. Events 334 BC - The Greek army of Alexander the Great defeats Darius III of Persia in the Battle of the Granicus. 2000 ( MM) was a Leap year that started on Saturday of the Common Era, in accordance with the Gregorian calendar. 0, was released. [4] On July 13, 2004, PHP 5 was released, powered by the new Zend Engine II. Events 1174 - William I of Scotland, a key rebel in the Revolt of 1173-1174, is captured at Alnwick by forces loyal to "MMIV" redirects here For the Modest Mouse album see " Baron von Bullshit Rides Again " [4] PHP 5 included new features such as improved support for object-oriented programming, the PHP Data Objects extension (which defines a lightweight and consistent interface for accessing databases), and numerous performance enhancements. Object-oriented programming (OOP is a Programming paradigm that uses " objects " and their interactions to design applications and computer programs [11] The most recent update released by The PHP Group is for the older PHP version 4 code branch. As of January 2008, this branch is up to version 4. 4. 8. PHP 4 is no longer under active development but will be supported by security updates until August 8, 2008. Events 1220 - Sweden is defeated by Estonian tribes in the Battle of Lihula. 2008 ( MMVIII) is the current year in accordance with the Gregorian calendar, a Leap year that started on Tuesday of the Common [12][13]
In 2008, PHP 5 became the only stable version under development. Late static binding has been missing from PHP and will be added in version 5. In Programming languages name binding is the association of values with Identifiers An identifier bound to a value is said to reference 3. [14] [15] Alongside PHP 5, PHP 6 is also under active development. Major changes include the removal of register_globals[16], magic quotes, and safe mode. Magic quotes are a controversial feature of the PHP scripting language intended to help prevent inexperienced developers from writing code which is vulnerable to SQL injection Safe mode usually refers to a diagnostic mode used by a computer Operating system (OS [12][17]
PHP does not have complete native support for Unicode or multibyte strings;[18] unicode support will be included in PHP 6. In Computing, Unicode is an Industry standard allowing Computers to consistently represent and manipulate text expressed in most of the world's [19] Many high profile open source projects ceased to support PHP 4 in new code as of February 5, 2008, due to the GoPHP5 initiative, provided by a consortium of PHP developers promoting the transition from PHP 4 to PHP 5. Events 1576 - Henry of Navarre converts to Roman Catholicism in order to ensure his right to the throne of France. 2008 ( MMVIII) is the current year in accordance with the Gregorian calendar, a Leap year that started on Tuesday of the Common [20][21]
It runs in both 32-bit and 64-bit environments, but on Windows the only official distribution is 32-bit, requiring Windows 32-bit compatibility mode to be enabled while using IIS in a 64-bit Windows environment. The range of Integer values that can be stored in 32 bits is 0 through 4294967295 or −2147483648 through 2147483647 using Two's complement encoding '64-bit' CPUs have existed in Supercomputers since the 1960s and in RISC -based workstations and servers since the early 1990s. There is a third-party distribution[22] available for 64-bit Windows.
| Meaning | |
|---|---|
| Red | Old release; not supported |
| Yellow | Old release; still supported |
| Green | Current release |
| Blue | Future release |
| Major Version | Minor Version | Release date | Notes |
|---|---|---|---|
| 1. 0 | 1. 0. 0 | 1995-06-08 | Officially called "Personal Home Page Tools (PHP Tools)". Year 1995 ( MCMXCV) was a Common year starting on Sunday. Events of 1995 Events 68 - The Roman Senate accepts emperor Galba. 536 - St Silverius becomes Pope (probable This is the first use of the name "PHP". [4] |
| 2. 0 | 2. 0. 0 | 1996-04-16 | Considered by its creator as the "fastest and simplest tool" for creating dynamic web pages. Year 1996 ( MCMXCVI) was a Leap year starting on Monday (link will display full 1996 Gregorian calendar) Events 1178 BC - A Solar eclipse may have marked the return of Odysseus, legendary King of Ithaca, to his kingdom [4] |
| 3. 0 | 3. 0. 0 | 1998-06-06 | Development moves from one person to multiple developers. Year 1998 ( MCMXCVIII) was a Common year starting on Thursday (link will display full 1998 Gregorian calendar) Events 1508 - Maximilian I Holy Roman Emperor, is defeated in Friulia by Venetian forces; he is forced to sign a three-year Zeev Suraski and Andi Gutmans rewrite the base for this version. [4] |
| 4. 0 | 4. 0. 0 | 2000-05-22 | Added more advanced two-stage parse/execute tag-parsing system called the Zend engine. 2000 ( MM) was a Leap year that started on Saturday of the Common Era, in accordance with the Gregorian calendar. Events 334 BC - The Greek army of Alexander the Great defeats Darius III of Persia in the Battle of the Granicus. [23] |
| 4. 1. 0 | 2001-12-10 | Introduced 'superglobals' ($_GET, $_POST, $_SESSION, etc. Year 2001 ( MMI) was a Common year starting on Monday according to the Gregorian calendar. Events 1041 - Empress Zoe of Byzantium elevates her adoptive son to the throne of the Eastern Roman Empire as Michael V )[23] | |
| 4. 2. 0 | 2002-04-22 | Disabled register_globals by default. See also 2002 (disambiguation Year 2002 ( MMII) was a Common year starting on Tuesday of the Gregorian calendar. Events 1500 - Portuguese Navigator Pedro Álvares Cabral becomes the first European to sight Brazil. Data received over the network is not inserted directly into the global namespace anymore, closing possible security holes in applications. In Computer programming, a global variable is a variable that is accessible in every scope. [23][24] | |
| 4. 3. 0 | 2002-12-27 | Introduced the CLI, in addition to the CGI. See also 2002 (disambiguation Year 2002 ( MMII) was a Common year starting on Tuesday of the Gregorian calendar. Events 537 - The Hagia Sophia is completed 1512 - The Spanish Crown issues the Laws of Burgos, governing the [23] | |
| 4. 4. 0 | 2005-07-11 | Added man pages for phpize and php-config scripts. Year 2005 ( MMV) was a Common year starting on Saturday (link displays full calendar of the Gregorian calendar. Events 911 - Signing of the Treaty of Saint-Clair-sur-Epte between Charles the Simple and Rollo of Normandy. [23] | |
| 4. 4. 8 | 2008-01-03 | Several security enhancements and bug fixes. 2008 ( MMVIII) is the current year in accordance with the Gregorian calendar, a Leap year that started on Tuesday of the Common Events 1431 - Joan of Arc is handed over to the Bishop Pierre Cauchon. End of life release for PHP 4. Security updates only until 2008-08-08, if necessary. [25][26] | |
| 5. 0 | 5. 0. 0 | 2004-07-13 | Zend Engine II with a new object model. "MMIV" redirects here For the Modest Mouse album see " Baron von Bullshit Rides Again " Events 1174 - William I of Scotland, a key rebel in the Revolt of 1173-1174, is captured at Alnwick by forces loyal to [8] |
| 5. 1. 0 | 2005-11-24 | Performance improvements with introduction of compiler variables in re-engineered PHP Engine. Year 2005 ( MMV) was a Common year starting on Saturday (link displays full calendar of the Gregorian calendar. Events 380 - Theodosius I makes his adventus, or formal [8] | |
| 5. 2. 0 | 2006-11-02 | Enabled the filter extension by default. Year 2006 ( MMVI) was a Common year starting on Sunday of the Gregorian calendar. Events 1570 - A Tidal wave in the North Sea devastates the coast from Holland to Jutland, killing more than 1000 [8] | |
| 5. 2. 6 | 2008-05-01[27] | Several security enhancements and bug fixes[28] | |
| 5. 2008 ( MMVIII) is the current year in accordance with the Gregorian calendar, a Leap year that started on Tuesday of the Common Events 305 - Diocletian and Maximian retire from the office of Roman Emperor. 3. 0 | No date set | Namespace support; Improved XML support through use of XMLReader and XMLWriter; SOAP support [29], Late static bindings, Jump label (limited goto) | |
| 6. A namespace is an abstract container or environment created to hold a logical grouping of unique identifiers (i 0 | 6. 0. 0 | No date set | Unicode support; removal of 'ereg()', 'register_globals', 'magic_quotes' and 'safe_mode'; Alternative PHP Cache; Removal of mime_magic and rewrite of fileinfo() for better MIME support[30] |
PHP is a general-purpose scripting language that is especially suited for web development. In Computing, Unicode is an Industry standard allowing Computers to consistently represent and manipulate text expressed in most of the world's Multipurpose Internet Mail Extensions ( MIME) is an Internet standard that extends the format of e-mail to support text in Character Web development is a broad term for any activity related to developing a Web site for the World Wide Web or an Intranet. PHP generally runs on a web server, taking PHP code as its input and creating web pages as output. The term web server can mean one of two things A Computer program that is responsible for accepting HTTP requests from web clients which are A web page or webpage is a resource of information that is suitable for the World Wide Web and can be accessed through a Web browser. It can also be used for command-line scripting and client-side GUI applications. In Computer networking the term client-side refers to operations that are performed by the client in a Client-server relationship PHP can be deployed on most web servers, many operating systems and platforms, and can be used with many relational database management systems. The term web server can mean one of two things A Computer program that is responsible for accepting HTTP requests from web clients which are An operating system (commonly abbreviated OS and O/S) is the software component of a Computer system that is responsible for the management and coordination In Computing, a platform describes some sort of Hardware architecture or Software framework (including Application frameworks, that allows A Relational database management system (RDBMS is a Database management system (DBMS that is based on the Relational model as introduced by E It is available free of charge, and the PHP Group provides the complete source code for users to build, customize and extend for their own use. [6]
PHP primarily acts as a filter[31], taking input from a file or stream containing text and/or PHP instructions and outputs another stream of data; most commonly the output will be HTML. A filter is a computer program to process a Data stream. Some Operating systems such as Unix are rich with filter programs It can automatically detect the language of the user. [32][33] From PHP 4, the PHP parser compiles input to produce bytecode for processing by the Zend Engine, giving improved performance over its interpreter predecessor. In Computer science and Linguistics, parsing, or more formally syntactic analysis, is the process of analyzing a sequence of tokens to A compiler is a Computer program (or set of programs that translates text written in a computer language (the source language) into another Bytecode is a term which has been used to denote various forms of Instruction sets designed for efficient execution by a software interpreter as well as being suitable The Zend Engine is an Open source Scripting engine (a Virtual Machine) commonly known for the important role it plays in the web automation language In Computer science, an interpreter normally means a Computer program that executes, i [34]
Originally designed to create dynamic web pages, PHP's principal focus is server-side scripting[35], and it is similar to other server-side scripting languages that provide dynamic content from a web server to a client, such as Microsoft's ASP.NET system, Sun Microsystems' JavaServer Pages[36], and mod_perl. Server-side scripting is a Web server technology in which a user's request is fulfilled by running a script directly on the web server to generate dynamic HTML pages A client is an application or system that accesses a remote service on another Computer system, known as a server, by way of a Network. Microsoft Corporation is an American multinational Computer technology Corporation, which rose to dominate the Home computer ASPNET is a Web application framework developed and marketed by Microsoft, that Programmers can use to build dynamic Web sites Web applications Sun Microsystems Inc ( is a multinational vendor of Computers computer components Computer software, and Information technology services JavaServer Pages ( JSP) is a Java technology that allows Software developers to dynamically generate HTML, XML or other types of documents mod_perl is an optional module for the Apache HTTP server. It embeds a Perl interpreter into the Apache server so that dynamic content produced by Perl PHP has also attracted the development of many frameworks that provide building blocks and a design structure to promote rapid application development (RAD). A software framework, in Computer programming, is an abstraction in which common code providing generic functionality can be selectively overridden or specialized by user Rapid application development ( RAD) is a Software development process, which involves iterative development and the construction of Prototypes Some of these include CakePHP, PRADO, Symfony and Zend Framework, offering features similar to other web application frameworks. CakePHP is an Open source Web application framework written in PHP, modeled after the concepts of Ruby on Rails, and distributed under the PRADO is a component-based and event-driven Web application framework for PHP 5 Symfony is a Web application framework written in PHP which follows the Model-view-controller (MVC paradigm Zend Framework is an Open source, Object-oriented Web application framework implemented in PHP 5 and licensed under the New BSD License This is a list of notable Web application frameworks used for creating Web applications
The LAMP architecture has become popular in the web industry as a way of deploying web applications. The Acronym LAMP refers to a Solution stack of software usually Free and open source software, used to run dynamic Web sites or servers PHP is commonly used as the P in this bundle alongside Linux, Apache and MySQL, although the P may also refer to Python or Perl. Linux (commonly pronounced ˈlɪnəks MySQL is a Relational database management system (RDBMS which has more than 11 million installations Python is a general-purpose High-level programming language. Its design philosophy emphasizes programmer productivity and code readability NOTES FOR EDITORS "Perl" is not an acronym (read the "Name" section below
As of April 2007, over 20 million Internet domains were hosted on servers with PHP installed, and PHP was recorded as the most popular Apache module. [7]
Insecure scripts written in PHP are popular targets of hackers who exploit poorly built applications written in PHP. In common usage hacker is generic term for a computer criminal often with a specific specialty in computer intrusion Software vulnerabilities related to PHP are identified among the CVE (Common Vulnerabilities and Exposures) records, available from the National Vulnerability Database. Common Vulnerabilities and Exposures, or CVE, is a dictionary of publicly-known information security vulnerabilities and exposures The National Vulnerability Database is the US government repository of standards based vulnerability management data represented using the Security Content Automation Protocol The proportion of vulnerabilities related to PHP, out of the total of all common vulnerabilities, amounted to: 12% in 2003, 20% in 2004, 28% in 2005, 43% in 2006, 36% in 2007, and 33. 8% for the first quarter of 2008. More than a quarter of all software vulnerabilities listed in this database are related to scripts written in PHP, and more than a third of vulnerabilities listed recently. Most of these vulnerabilities can be exploited remotely, that is without being logged on the computer hosting the vulnerable application. [37] Such exploitation is made possible due to poor programming habits, such as failing to check data before entering it into a database, and features of the language such as register_globals, which is now deprecated. [24] These result in code injection, cross-site scripting and other application security issues. Code injection is the exploitation of a computer bug that is caused by processing invalid data Cross-site scripting ( XSS) is a type of computer security vulnerability typically found in Web applications which allow Code injection Application security encompasses measures taken throughout the life-cycle to prevent exceptions in the Security policy of an application or the underlying Such attacks are not exclusive to PHP and most can be avoided simply by following proper coding techniques and principles.

PHP only parses code within its delimiters. See also PHP The syntax of the PHP Programming language is the set of rules that defines how a PHP program will be written and interpreted Syntax highlighting is a feature of some Text editors that displays text&mdashespecially Source code &mdashin different colors and fonts according to A delimiter is a sequence of one or more characters used to specify the boundary between separate independent regions in Plain text or other data stream Anything outside its delimiters is sent directly to the output and is not parsed by PHP. The most common delimiters are <?php and ?>, which are open and close delimiters respectively. <script language="php"> and </script> delimiters are also available. Short tags (<? or <?= and ?>) are also commonly used, but like ASP-style tags (<% or <%= and %>), they are less portable as they can be disabled in the PHP configuration. For this reason, the use of short tags and ASP-style tags is discouraged. [38] The purpose of these delimiters is to separate PHP code from non-PHP code, including HTML. Everything outside the delimiters is ignored by the parser and is passed through as output. [39]
Variables are prefixed with a dollar symbol and a type does not need to be specified in advance. In Computer science, primitive types — as distinct from Composite types ' — are Data types provided by a Programming language as basic Unlike function and class names, variable names are case sensitive. Both double-quoted ("") and heredoc strings allow the ability to embed a variable's value into the string. A here document (also called a here-document or a heredoc) is a way of specifying a String literal in command line shells such as Bash [40] PHP treats newlines as whitespace in the manner of a free-form language (except when inside string quotes), and statements are terminated by a semicolon. In Computing, a newline (also known as a line break or end-of-line / EOL character is a special character or sequence of characters In Computer science, whitespace is any single character or series of characters that represents horizontal or vertical space in Typography. In Computer programming, a free-form language is a Programming language in which the positioning of characters on the page in program text is not significant [41] PHP has three types of comment syntax: /* */ serves as block comments, and // as well as # are used for inline comments. Statements Programming language statements typically have conventions for statement separators statement terminators and [42]
To output text to the browser, either the print function or the echo function is used. Both functions are nearly identical; the major difference is that print is slower than echo because the former will return the integer value of 1 in order to behave more like a function, rather than a language construct, whereas the latter does not return a status and only returns the text for output. A language construct is a syntactically allowable part of a program that may be formed from one or more Lexical tokens in accordance with the rules of a [43] Because print will behave more like a function, it can be used in expressions where echo cannot. It is important to understand however that both are considered language constructs and not functions, the only difference is in their behavior, as clearly outlined above. [44]
PHP stores whole numbers in a platform-dependent range. This range is typically that of 32-bit signed integers. In Mathematics, negative numbers in any base are represented in the usual way by prefixing them with a "&minus" sign In computer science the term integer is used to refer to a Data type which represents some finite subset of the mathematical Integers These are also known as Unsigned integers are converted to signed values in certain situations; this behavior is different from other programming languages. [45] Integer variables can be assigned using decimal (positive and negative), octal, and hexadecimal notations. The octal Numeral system, or oct for short is the base -8 number system and uses the digits 0 to 7 In Mathematics and Computer science, hexadecimal (also base -, hexa, or hex) is a Numeral system with a Real numbers are also stored in a platform-specific range. In Mathematics, the real numbers may be described informally in several different ways They can be specified using floating point notation, or two forms of scientific notation. In Computing, floating point describes a system for numerical representation in which a string of digits (or Bits represents a Real number. Scientific notation, also sometimes known as standard form or as exponential notation, is a way of writing numbers that accommodates values too large or small to be [46] PHP has a native Boolean type that is similar to the native Boolean types in Java and C++. In Computer science, the Boolean datatype, sometimes called the logical datatype, is a Primitive datatype having one of two values C++ (" C Plus Plus " ˌsiːˌplʌsˈplʌs is a general-purpose Programming language. Using the Boolean type conversion rules, non-zero values are interpreted as true and zero as false, as in Perl and C++. [46] The null data type represents a variable that has no value. The only value in the null data type is NULL. [46] Variables of the "resource" type represent references to resources from external sources. These are typically created by functions from a particular extension, and can only be processed by functions from the same extension; examples include file, image, and database resources. [46] Arrays can contain elements of any type that PHP can handle, including resources, objects, and even other arrays. Order is preserved in lists of values and in hashes with both keys and values, and the two can be intermingled. In Computer science, a hash table, or a hash map, is a Data structure that associates keys with values. [46] PHP also supports strings, which can be used with single quotes, double quotes, or heredoc syntax. In Computer programming and some branches of Mathematics, a string is an ordered Sequence of Symbols. A here document (also called a here-document or a heredoc) is a way of specifying a String literal in command line shells such as Bash [47]
PHP has hundreds of base functions and thousands more from extensions. Functions are not first-class functions and can only be referenced by their name. In Computer science, a Programming language is said to support first-class functions (or function literal) if it treats functions as [48] User-defined functions can be created at any time without being prototyped. [48] Functions can be defined inside code blocks, permitting a run-time decision as to whether or not a function should be defined. In Computer science, dynamic dispatch is the process of mapping a message to a specific sequence of code ( method) at Runtime. Function calls must use parentheses, with the exception of zero argument class constructor functions called with the PHP new operator, where parentheses are optional. In Object-oriented programming, a constructor (sometimes shortened to ctor) in a class is a special block of statements called when an object is created PHP supports quasi-anonymous functions through the create_function() function, although they are not true anonymous functions because anonymous functions are nameless, but functions can only be referenced by name, or indirectly through a variable $function_name();, in PHP. In Computing, an anonymous function is a function (or a Subroutine) defined and possibly called without being bound to a name [48]
Basic object-oriented programming functionality was added in PHP 3. Object-oriented programming (OOP is a Programming paradigm that uses " objects " and their interactions to design applications and computer programs [4] Object handling was completely rewritten for PHP 5, expanding the feature set and enhancing performance. [49] In previous versions of PHP, objects were handled like primitive types. In Computer science, primitive types — as distinct from Composite types ' — are Data types provided by a Programming language as basic [49] The drawback of this method was that the whole object was copied when a variable was assigned or passed as a parameter to a method. In the new approach, objects are referenced by handle, and not by value. In computer science a smart pointer is an Abstract data type that simulates a Pointer while providing additional features such as automatic garbage collection PHP 5 introduced private and protected member variables and methods, along with abstract classes and final classes as well as abstract methods and final methods. A variable (ˈvɛərɪəbl is an Attribute of a physical or an abstract System which may change its Value while it is under Observation. This article discusses types with no direct members see also Abstract data type. A data type in Programming languages is an attribute of a datum which tells the computer (and the programmer something about the kind of datum it is In Object-oriented programming, the term method refers to a Subroutine that is exclusively associated either with a class (called class methods In Object-oriented programming, the term method refers to a Subroutine that is exclusively associated either with a class (called class methods It also introduced a standard way of declaring constructors and destructors, similar to that of other object-oriented languages such as C++, and a standard exception handling model. In Object-oriented programming, a constructor (sometimes shortened to ctor) in a class is a special block of statements called when an object is created In Object-oriented programming, a destructor (sometimes shortened to dtor) is a method which is automatically invoked when the object is destroyed C++ (" C Plus Plus " ˌsiːˌplʌsˈplʌs is a general-purpose Programming language. Exception handling is a programming language construct or computer hardware mechanism designed to handle the occurrence of a condition that changes the normal flow of execution Furthermore, PHP 5 added interfaces and allowed for multiple interfaces to be implemented. There are special interfaces that allow objects to interact with the runtime system. Objects implementing ArrayAccess can be used with array syntax and objects implementing Iterator or IteratorAggregate can be used with the foreach language construct. In Computer science an array is a Data structure consisting of a group of elements that are accessed by indexing. In Computer science, an iterator is an object which allows a programmer to traverse through all the elements of a collection, regardless of its specific In Computer science, an iterator is an object which allows a programmer to traverse through all the elements of a collection, regardless of its specific There is no virtual table feature in the engine, so static variables are bound with a name instead of a reference at compile time. A virtual method table, virtual function table, Dispatch table, or vtable, is a mechanism used in Programming language to support dynamic dispatch Global variable|Static memory allocationIn Computer programming, static variables data value persists for the life of the running process and typically have a broader scope [50]
If the developer creates a copy of an object using the reserved word clone, the Zend engine will check if a __clone() method has been defined or not. If not, it will call a default __clone() which will copy the object's properties. If a __clone() method is defined, then it will be responsible for setting the necessary properties in the created object. For convenience, the engine will supply a function that imports the properties of the source object, so that the programmer can start with a by-value replica of the source object and only override properties that need to be changed. [51]
PHP includes free and open source libraries with the core build. This is the present list of all officially documented libraries for the PHP programming language PHP is a fundamentally Internet-aware system with modules built in for accessing FTP servers, many database servers, embedded SQL libraries such as embedded MySQL and SQLite, LDAP servers, and others. The Internet is a global system of interconnected Computer networks MySQL is a Relational database management system (RDBMS which has more than 11 million installations SQLite is a mostly ACID -compliant Relational database management system contained in a relatively small (~500 kB) C programming library The Lightweight Directory Access Protocol, or LDAP (ˈɛl dæp is an Application protocol for querying and modifying Directory services running over Many functions familiar to C programmers such as those in the stdio family are available in the standard PHP build. TemplateC_Standard_library --> stdioh, which stands for "standard input/output header" is the header in the [52] PHP has traditionally used features such as "magic_quotes_gpc" and "magic_quotes_runtime" which attempt to escape apostrophes (') and quotes (") in strings in the assumption that they will be used in databases, to prevent SQL injection attacks. Magic quotes are a controversial feature of the PHP scripting language intended to help prevent inexperienced developers from writing code which is vulnerable to SQL injection SQL injection is a technique that exploits a Security vulnerability occurring in the Database layer of an application. This leads to confusion over which data is escaped and which is not, and to problems when data is not in fact used as input to a database and when the escaping used is not completely correct. [53] To make code portable between servers which do and do not use magic quotes, developers can preface their code with a script to reverse the effect of magic quotes when it is applied. [54]
PHP allows developers to write extensions in C to add functionality to the PHP language. tags please moot on the talk page first! --> In Computing, C is a general-purpose cross-platform block structured These can then be compiled into PHP or loaded dynamically at runtime. Extensions have been written to add support for the Windows API, process management on Unix-like operating systems, multibyte strings (Unicode), cURL, and several popular compression formats. The Windows API, informally WinAPI, is Microsoft's core set of Application programming interfaces (APIs available in the Microsoft Windows Operating A Unix-like (sometimes shortened to *nix) Operating system is one that behaves in a manner similar to a Unix system while not necessarily conforming An operating system (commonly abbreviated OS and O/S) is the software component of a Computer system that is responsible for the management and coordination In Computing, Unicode is an Industry standard allowing Computers to consistently represent and manipulate text expressed in most of the world's cURL is a Command line tool for transferring files with URL syntax. An archive format is the File format of an Archive file. The archive format is determined by the File archiver. Some more unusual features include integration with Internet relay chat, dynamic generation of images and Adobe Flash content, and even speech synthesis. Adobe Flash (previously called Shockwave Flash and Macromedia Flash) is a set of Multimedia software created by Macromedia and currently Speech synthesis is the artificial production of human speech. The PHP Extension Community Library (PECL) project is a repository for extensions to the PHP language. The PHP Extension and Application Repository, or PEAR, is a repository of PHP software code [55]
As with many scripting languages, PHP scripts are normally kept as human-readable source code, even on production web servers. [56] While this allows flexibility, releasing scripts in source form is undesirable for commercial software developers, and can raise issues with security of web servers; as an example, if a hacker acquires control of a server, database passwords may be quickly discovered, and undesirable changes to scripts may be made that remain undiscovered indefinitely. Various encoding tools are available for PHP to offer code protection.
Code optimizers improve the quality of the compiled code by reducing its size and making changes that can reduce the execution time and improve performance. The nature of the PHP compiler is such that there are often opportunities for code optimization[57], and an example of a code optimizer is the Zend Optimizer PHP extension. A compiler is a Computer program (or set of programs that translates text written in a computer language (the source language) into another In Computing, optimization is the process of modifying a system to make some aspect of it work more efficiently or use fewer resources A PHP accelerator is an extension designed to boost the performance of Software applications written using the PHP Programming language. [58]
PHP accelerators can offer significant performance gains by caching the compiled form of a PHP script in shared memory to avoid the overhead of parsing and compiling the code every time the script runs. A PHP accelerator is an extension designed to boost the performance of Software applications written using the PHP Programming language. In Computer science, a cache (kæʃ like "cash") is a collection of data duplicating original In Computing, shared memory is a memory that may be simultaneously accessed by multiple programs with an intent to provide communication among them or avoid redundant copies In Computer science and Linguistics, parsing, or more formally syntactic analysis, is the process of analyzing a sequence of tokens to A compiler is a Computer program (or set of programs that translates text written in a computer language (the source language) into another They may also perform code optimization to provide increased execution performance. In Computing, optimization is the process of modifying a system to make some aspect of it work more efficiently or use fewer resources
Zend provides a certification program for programmers to become certified PHP developers. PHP Certification is the exam taken by some companies in training certification area