Why Learn PHP?
Do you want to learn how to write a web application? There are several languages you could choose. PHP is by far one of the most popular, and the one I recommend.
Here are nine reasons why I choose PHP:
#1 Using PHP is completely free
You don’t need to pay any licence fees, so the cost of creating a web application in PHP is minimal. PHP also runs on all major operating systems: Windows, OSX and Linux. There are several totally free packages available like XAMPP that will install everything you need to start developing on your local computer. There are also many free source code editors like Atom, that will help you to start creating a PHP website in no time.
#2 It’s painless
Getting started writing PHP is very easy. You can just write the code in a text file, then access your script in a web browser. PHP is an interpreted language, which means you don’t need to compile it, you can just run it. PHP has a very gentle learning curve, and it’s easy to start writing useful code quickly. It’s also a very forgiving programming language, with many ways to accomplish the same task.
#3 It’s easy to get online
Any shared hosting package is almost guaranteed to support PHP. This means that you can get started running your web application on cheap, shared hosting, then upgrade to a more powerful server when you need to. Putting your code live is also as simple as copying the files from your computer to the live server.
#4 Excellent documentation and community support
The official PHP documentation is comprehensive, easy to use, and full of examples. Also, the PHP community is vast – from forums on the official website, to communities like Stack Overflow, you’re never far from professional help and advice.
#5 PHP is highly flexible
PHP can be used to create any kind of web application you can think of, from simple dynamic websites, to eCommerce sites that use shopping carts, content management systems, and so on. Also, PHP can connect to many different databases, from the open-source MariaDB, to Microsoft SQL Server. If you use MariaDB or MySQL, just like PHP these are free and you don’t need a licence to use them.
#6 Fast and secure PHP is fast, and uses minimal server resources
You can easily run a PHP web application on shared hosting. It’s also designed with security in mind, and includes many features to help you write secure code. Yes, it’s possible to write insecure code using PHP, but that’s true of any language. Learn to write it properly, and your code will be as secure as any other language.
#7 A modern language PHP can be written using object oriented techniques if you need to
You can do unit testing using PHPUnit, and there are many frameworks available that help you create web applications quickly like Laravel, Symfony and CodeIgniter.
#8 Huge libraries available
Huge standard library and many third-party packages available PHP comes with a huge library of available functions, all built in to allow you start using them without having to install anything else. If you do need some third party code, there’s a huge repository of packages available at Packagist.
#9 Desirable skills
PHP developers are in high demand. A high proportion of sites on the internet use PHP, so the need for PHP skills isn’t going away any time soon. WordPress, one of the most popular content management systems on the internet, is written in PHP. So, if you want to start writing web applications, you can’t go wrong by learning PHP.
In summary, I’m passionate about PHP – I’ve created the very popular PHP for Beginners course on Udemy. This course is right for you if you want to learn how to use PHP as I assume no previous programming experience.