Subjects covered in this free ebook include:
- Getting started with PHP
- Variables
- Variable Scope
- Superglobal Variables PHP
- Outputting the Value of a Variable
- Constants
- Magic Constants
- Comments
- Types
- Operators
- References
- Arrays
- Array iteration
- Executing Upon an Array
- Manipulating an Array
- Processing Multiple Arrays Together
- Datetime Class
- Working with Dates and Time
- Control Structures
- Loops
- Functions
- Functional Programming
- Alternative Syntax for Control Structures
- String formatting
- String Parsing
- Classes and Objects
- Namespaces
- Sessions
- Cookies
- Output Buffering
- JSON
- SOAP Client
- Using cURL in PHP
- Reflection
- Dependency Injection
- XML
- SimpleXML
- Parsing HTML
- Regular Expressions (regexp/PCRE)
- Traits
- Composer Dependency Manager
- Magic Methods
- File handling
- Streams
- Type hinting
- Filters & Filter Functions
- Generators
- UTF-8
- Unicode Support in PHP
- URLs
- How to break down a URL
- Object Serialization
- Serialization
- Closure
- Reading Request Data
- Type juggling and Non-Strict Comparison Issues
- Sockets
- PDO
- PHP MySQLi
- SQLite3
PHP: Hypertext Preprocessor (or simply PHP) is a server-side scripting language designed for web development. It was originally created by Rasmus Lerdorf in 1994; the PHP reference implementation is now produced by The PHP Group. PHP originally stood for Personal Home Page, but it now stands for the recursive initialism PHP: Hypertext Preprocessor.
PHP code may be embedded into HTML code, or it can be used in combination with various web template systems, web content management systems, and web frameworks. PHP code is usually processed 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 and executed PHP code, which may be any type of data, including images, with the generated web page. PHP code may also be executed with a command-line interface (CLI) and can be used to implement standalone graphical applications.
The standard PHP interpreter, powered by the Zend Engine, is free software released under the PHP License. PHP has been widely ported and can be deployed on most web servers on almost every operating system and platform, free of charge.
The PHP language evolved without a written formal specification or standard until 2014, with the original implementation acting as the de facto standard which other implementations aimed to follow. Since 2014 work has gone on to create a formal PHP specification.
PHP development began in 1994 when Rasmus Lerdorf wrote several Common Gateway Interface (CGI) programs in C,[10][11][12] which he used to maintain his personal homepage. He extended 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 and improve 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 on June 8, 1995. This release already had the basic functionality that PHP has today. This included Perl-like variables, form handling, and the ability to embed HTML. The syntax resembled that of Perl, but was simpler, more limited and less consistent.
Early PHP was not intended to be a new programming language, and grew organically, with Lerdorf noting in retrospect: "I don't know how to stop it, there was never any intent to write a programming language [...] I have absolutely no idea how to write a programming language, I just kept adding the next logical step on the way." A development team began to form and, after months of work and 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 to inconsistent naming of functions and inconsistent ordering of their parameters. In some cases, the function names were chosen to match the lower-level libraries which PHP was "wrapping", while in some 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.
Source: wikipedia