PHP is one of the many acronyms you may hear as you surf the inner-workings of the web world. Originally standing for ‘Personal Home Page’, it now stands for ‘Hypertext Preprocessor’. In short, it’s a server-side programming language for websites and other applications. It’s the language you can’t ‘see’, but drives the content on many of the websites we view everyday.
Server side language? Huh?
Websites are just files and other related content residing on a computer. Yes, just a computer. It may be a bit fancier than the laptop you are reading this on right now, but web servers are just computers connected to the internet, serving the content we see as ‘websites’. I don’t want to get too far down that trail as far as explaining that, but for now that’s the simple explanation. Some of you may have seen the ‘View Source’ option in your web browser, which will show you the HTML code behind a web page. This is the part of the code that determines how you see a website. It is the presentation code which tells your computer how to interpret and style the site’s text, images, etc… HTML essentially ‘runs’ on your computer. PHP is code that is only executed on the server, and generates HTML or performs other tasks such as database interaction, complex calculations, and the like.
Think of PHP as the man behind the curtain – without him most sites would not be possible. They would also have to be hand-written in HTML, which in many cases would be unmanageable. PHP saves us hours and hours of time when building sites, as things can written one time be re-used throughout the site.
Now that you have a basic idea what PHP is, let’s talk about PHP developers.
Dealing in abstractions
Since most PHP code is either digging content out of a database, or calculating an eCommerce purchase, or showing a report of some kind, the language is not written so it makes much sense to a layperson. ‘Jibberish’ is a term often used when a client accidentally runs across some raw PHP. Best described as a way for programming concepts to take place, PHP is only obligated to perform it’s utilitarian function in the most efficient way possible, then go back into it’s little cave. The developer’s job is to find ways to write code that runs quickly, accurately, and makes sense to the next developer tasked with working on the site. ‘Best Practices’ is a frequently used term in the coding world – meaning nothing more than following standard conventions with coding technique. If you’re the only one who understands your code, maybe it’s overly complex. A good PHP developer writes lean, mean code that does the job and makes sense to his or her colleagues.
The abstraction of a server-side language can vary from extremely vague class references (classes are re-usable pieces of code) to arcane object-oriented methods that rely on external code or libraries of pre-written PHP, which may not necessarily even be seen directly by the developer. There are many popular libraries like CodeIgniter, Laravel, Zend, and many more. These are fully-functional frameworks that provide most of the heavy-lifting for PHP applications, which developers can use as a code base to build larger, more complex applications or sites. To be a well-rounded PHP developer, you have to familiarize yourself with these frameworks and learn how to interact with them, as you will no doubt run into them on a project if you do enough coding work. These frameworks can seem overly abstract to a beginning developer, but as one gains knowledge and skill, the value of these coding libraries really becomes apparent, and the time saved is priceless.
If you have a website that was created in the last decade, chances are you have a site that uses PHP. All of the WordPress, Joomla, Drupal, and similar sites use PHP exclusively, and when things go wrong it is important to have a knowledgeable developer available to work on them. As the web evolves, older sites using PHP need to be updated as well, as coding conventions are deprecated and new methods need to be used to accommodate the changing web server environments. Often there will be little things that just mysteriously stop working on a site, often because the web hosting company deployed an update that isn’t compatible with your site code. A good developer can find these incompatibilities and fix them using modern coding tactics.
So, on your next web project, or even your current site, don’t forget the man behind the curtain – remember that humble jibberish we call PHP!