PHP is the most popular language used for web development. Unarguably the winner in terms of popularity. If you are planning to jump into building modern websites, choose PHP without even thinking for a second.
It is the number one programming language when it comes to web development and there are reasons to it. I will detail them in this article and give you an introduction for 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 is 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 as “Personal Home Page (PHP) Tools”. The initial PHP was as 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 the PHP stands for the recursive initialism PHP: Hypertext Preprocessor. You can read the official PHP language reference to know in-depth about core language constructs.
ElePHPant is the mascot of PHP. Adorable isn’t it?
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) |
|
Language core was changed by Zeev Suraski and Andi Gutmans 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 clear official mention on why version 6 was skipped and there are many theories floating around. You can get more information on this by going 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 the official release notes for the complete list. |
I posted an article in a FB group of developers on how to do web development using PHP. 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 on the helm, Python is growing rapidly, 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 in 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 by using variable variables. |
4. | Real-Time Access Monitoring – PHP provides access logging by creating the summary of recent accesses for the user. |
5. | Magic Method – PHP has built in methods starts with __ (double underscore). These methods can’t be called directly. Rather, it will be called on the event basis. For example, __clone() will be called, when the clone keyword is used. |
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 extensive parsing and pattern matching mechanism with remarkable speed. |
8. | nowdocs and heredocs String – PHP provides the nowdocs and heredocs properties are used to delimit some block of context. nowdocs and heredocs are same except the context in the heredocs allow variable parsing. |
9. | Traits – PHP is a single inheritance language. The traits concept is used to cover inheritance limitation and support inheritance at multiple levels. |