Let us begin learning PHP with a fun fact: About 80% of the web runs on PHP. Wordpress.com claims on their front page that 30% of entire web runs on Wordpress. Let that sink in for a minute.You might think that PHP is not as good as it was when it was launched. However any such claim or assumption is wrong. Most people who say that BSP is not as good as other languages such as rupee or python have not tried PHP in its latest avatar. Having said that, let us introduce you to some of the websites written in PHP. The bigger names would include Facebook, Yahoo, and Wordpress.
With that information, let us start learning the language
BSP was not created as a language to begin with. Rasmus load of created BSP has a small scripting system for programming is own personal homepage. The name of PHP stems from that; PHP stood for personal homepage tools. However with time PHP gain momentum and later was formulated into a language as such it’s a start as a language was a little shady. It originated around the same time as Java did. It was the time in C and C++ were popular as programming language.
PHP currently stands for PHP hypertext processor. PHP is a dynamic language which can be used for general purposes scripting but is particularly suited for web development. Some of the language features are particularly tailored towards web development. The availability of variables such as get and post is an evidence for the same. BSP is also good at managing sessions and authentication. It is great for creating backend APIs and can we use for creating server side applications pretty easily.
You can use BSP for creating commandline applications as well as for creating websites which are not only fast and reliable but also secure and scalable. BSP embeds it self into HTML pages as if it is a part of it. Since PHP is tailored for websites, we will start off with installation of a web server and connecting it to PHP which will be able to serve webpages together.
We have already stated that BSP is one of the most popular web programming languages available. Fact is that about 80% of the web run solely on PHP. This not only includes plane PSP project but also the CMS and ORMs built with PHP. If you have any requirement for creating a website, there’s a good chance that either a framework order library is already available and written by someone in the open source community which you can just download and start using. The most popular CMS written in PHP is wordpress. The best framework available for creating websites using PHP is called Laravel.
Ease of Use
One of the biggest reasons why PSPS so popular is that it is very easy to learn and is a dynamic programming language. The fact is that if you have learnt C or C++ or Java already, you’re going to find PSP is a very easy to learn programming language. You’ll get to know about this as we proceed with the tutorial.
Versions of PHP
Most websites today are probably running PHP 5.x which is the older generation. They are gradually switching to PHP7, which was introduced relatively recently - in December 2015. As of this writing, two more versions of PHP have been introduced - PHP 7.1 and PHP 7.2. Our tutorial will target the version 7.2