Is Learning PHP Worth It?

You’re curious and you want to take this opportunity to become a web developer, or perhaps work with website building teams. You’re asking this question because you’re concerned of its future. You want to learn a programming language that’s going to be future-proof. Programming languages or to be more accurate for PHP, scripting languages come and go. Some of them stole the limelight while others only lasted a few moments of fame. Unfortunately, there are even others that weren’t able to stir the attention of developers and simply got ignored or in other words, they come and go without even being noticed. But I can say that PHP will last and stay here for a while. For you who don’t like to read a long post, TL;DR PHP is worth learning and mastering this language will take you far and make you famous (if you became a guru) for decades to come, well as of 2014.

What Makes You Think PHP is Worth Learning?

There are dozens of reasons to explain and defend my argument. Ask people in forums, you’ll get 80% yes. Ask people in reddit.com, you’ll get the same answer. Do your research and see how many websites uses WordPress, Magento and Drupal as their CMS. Take a look at the statistics of PHP usage over the web. Still not convinced? What should I do to convince you? Is statistics not enough? Fine, let me explain it myself.

PHP as an Scripting Language

The primary use of PHP is for server-side scripting. It can handle form data, set cookies, interact with a database, and “talk” to other services using hundreds of protocols. It also enables you to create a powerful, fast and dynamic websites that is secured, robust and efficient. With PHP, you can alter a webpage, drop some JavaScript or create a custom CSS.

In addition to that, most of the popular open-source e-commerce platforms use PHP and very few have been breached. WordPress is entirely built using PHP and MySQL combo and they’ve been strong and running for years. They even earned the reputation for being the most used open-source CMS on the web.

Though PHP has its own flaws, its developers and the community is continually working to make it more robust. The upcoming release, PHP 7 (as of November 2014) promises up to 100% increase in performance as well as a number of bug fixes.

PHP as a Source of Income

While there is a couple of new server side scripting languages like Ruby on Rails and Java as well as the good old ASP.NET, PHP remains to be used by over 75% of websites online. Therefore, as a PHP expert, you can easily find freelancing jobs; you can even land a permanent job on a web development firm. Being a PHP expert, you can easily find gigs online. Though you might also want to learn Java because it’s an all-purpose, all platform programming language. And no, I’m not advertising it, I’m a huge PHP fan.

What is PHP?

PHP actually means PHP: Hypertext Preprocessor. It’s a recursive acronym. It’s a server-side scripting language created by Rasmus Lerdorf in 1994. This is the language you want to learn and use if you primarily want to develop web applications and web frameworks. A notable platform using PHP is WordPress, combining it with HTML, CSS and JavaScript; it was able to produce a web application that allows end users to create and establish their own website or online presence with minimal to no coding knowledge at all.

If you are an aspiring web developer, beside HTML, CSS and JavaScript as your basic knowledge, you are required to have a solid understanding of server-side scripting. However, unlike the three we mentioned, server-side scripting comes in different flavors. What do I mean with that? I mean there’s more to choose from, unlike for web design where there is a specific standard language that you need to learn. When it comes to web development and server side scripting, you can choose different languages. There are Java, PHP and Ruby among others. But the most popular is PHP.

Uses of PHP

PHP has a lot of uses and it can also be used as a general-purpose programming language. However, it’s most widely used for server-side scripting.

Server-side scripting is the most traditional use of PHP and it’s primarily designed with that in mind. All you need to make PHP work is the PHP parser, which can be a CGI or server module, a web server and a web browser. If you’re an aspiring web developer, you must know that there are several ways of setting up a local server in your home PC. Some possible solutions that you can find online are the LAMP, WAMP and XAMPP stacks. These solutions comes packages with apache, MySQL and PHP.

PHP can also be used for command line scripting. That means all you need is the PHP parser, nothing more. You can easily use this side of PHP for executing cron tasks on Linux and schedule tasks for Windows. It can also be used for simple text processing.

The least and probably the rarest use of PHP are writing desktop applications. Though PHP is mostly used for the web, it can also be used as a general-purpose programming language. That means you can write desktop application using PHP, that is, if you’re a true master and you know how to use all of the advanced features of the programming language. However, you use a separate version of PHP for writing desktop apps and that’s called PHP-GTK. This is an extension to PHP and it’s not available in the main distribution. They have their own website, separate from php.net and if you want to write desktop apps, you should go there.

In addition to that, PHP is also capable of talking to other services through the use of protocols like LDAP, IMAP, SNMP, NNTP, POP3, HTTP, COM (for windows) and tons of others. It will also allow you to open raw network sockets and interact with any other protocol. Pretty diverse, eh?