PHP is the most popular language used for web development. Unarguably the winner in terms of popularity. If you plan to build modern websites, choose PHP without even thinking for a second.
It is the number one programming language for web development, and there are reasons for it. I will detail them in this article and give you an introduction to PHP.
PHP was created by Rasmus Lerdorf in 1994.
I recommend you to watch this video; it is a talk by Rasmus Lerdorf on PHPday 2019, commemorating the 25 years of PHP. Yes, it has been more than 25 years now; PHP is live and rocking.
The first release of PHP was done in June 1995. It was then called “Personal Home Page (PHP) Tools.” The initial PHP was a set of CGI binaries written in C. Rasmus Lerdorf wrote it to track visits to his online resume.
Image of Rasmus Lerdorf by William Stadtwald Demchick via Wikimedia Commons.
Now PHP stands for the recursive initialism PHP: Hypertext Preprocessor. You can read the official PHP language reference in-depth about core language constructs.
ElePHPant is the mascot of PHP. Adorable.
Versions | Key Features | Description |
---|---|---|
PHP/FI (1995) |
|
Perl/CGI script (PHP 1.0) introduced by Rasmus Lerdorf. The Expansion is Personal Home Page / Form Interpreter. |
PHP/FI2 (1997) |
|
With slight modifications in Form Interpreter(PHP 2.0) to handle form entries. |
PHP 3 – (1998) |
|
Zeev Suraski and Andi Gutmans changed language core, and PHP refers to PHP: Hypertext Preprocessor. |
PHP 4 – (2000) |
|
With features for supporting enterprise-oriented applications. |
PHP 5 – (2004) |
|
PHP core was almost stabilized with this release. Later 5. X releases have slight enhancement. |
PHP 7 – (2016) |
|
PHP 6.0 was skipped, and PHP 7 was released. There was no explicit mention of why version 6 was skipped, and many theories are floating around. You can get more information on this through the linked HN discussion. |
PHP 7.4
28 Nov 2019 |
|
Note: This list presents only the major and the latest release.
The feature list is a high-level summary and not comprehensive. Please refer to the official release notes for the complete list. |
I posted an article in a FB group of developers on PHP web development. Among the volume of comments, there was a question that intrigued me.
Better say Why (PHP) than How!
When I started web development a decade ago, PHP was my natural choice. I never thought about why PHP!
Java is at the helm; Python is multiplying. Golang is there; so many choices around. Yes, the commenter was correct; I have to explain Why PHP.
To witness the execution of PHP checkout version PHP 7+. You will experience breakneck speed. More than highlighting features like these, I wish to highlight some unique features of PHP.
Robust, secure, cross-platform, blah blah blah, these are features that every language on the Earth has. Let’s see something unique about PHP.
S.No | Features |
---|---|
1. | Loosely Typed Language – PHP supports variable usage without declaring its data type. It will be taken at the time of the execution based on the type of data it has on its value. |
2. | PHP Array – Arrays in PHP are special datatypes and very flexible in the way you can handle them. |
3. | variable variables – PHP allows changing the variable name dynamically using variable variables. |
4. | Real-Time Access Monitoring – PHP provides access logging by creating a summary of recent accesses for the user. |
5. | Magic Method – PHP has built-in methods starting with __ (double underscore). These methods can’t be called directly. Instead, it will be called on an event basis. For example, when the clone keyword is used, __clone() will be called. |
6. | Error Reporting – It has some predefined error reporting constants to generate a warning or error notice. For example, when E_STRICT is enabled, a warning about deprecated methods will be generated. |
7. | Extended Regular Expression – PHP provides REGEX methods with remarkable speed and extensive parsing and pattern-matching mechanism. |
8. | ‘nowdocs’ and heredocs String – PHP provides the ‘nowdocs’, and heredocs properties used to delimit some context block. ‘nowdocs’ and heredocs are the same, except the context in the heredocs allow variable parsing. |
9. | Traits – PHP is a single inheritance language. The traits concept covers inheritance limitations and supports inheritance at multiple levels. |