The Allure of PHP
The Allure of PHP
Join the DZone community and get the full member experience.Join For Free
Hush, Cédric Beust just admitted he likes PHP. He cites the following reasons:
- PHP is like C
- PHP never let me down
- PHP is robust
- PHP’s documentation is great
- Universal support
- High reward
I agree with him mostly, except for the “robustness” part. Cedric, being a better programmer, might have got perfectly working code. But my guess is that all other things being equal, PHP is more brittle than other programming languages for the web. It is not a complicated language, but has its quirks.
But that is not what I want to talk about! The important thing to realize about PHP is that “universal support” thing, which means that PHP comes free with the cheapest hosting solutions available (LAMP servers). In plain English, because of that, PHP is not going away. For many small companies, you don’t need much more than PHP to create a simple website. It seems that PHP is used on 75% of all web servers. Take that, Java, C#, RoR, Python!
Also consider that there are many open source solution frameworks (WordPress, Drupal, Moodle, to name a few) on top of which you can build websites and applications. For example, if you wanted to create a website for your small business, why look anywhere other than WordPress? You can create and edit pages and there are thousands of plugins for everything from contact forms, SEO, analytics integration, e-commerce, job postings, etc. You hardly need to write a line of code.
This is not to suggest that you should throw away your existing programming language and start coding in PHP. If you were to build an application from the ground up without using any external packages, your first programming language of choice would be the right way to go because of the expertise you have acquired in it. On the other hand, if you were trying to assemble multiple software pieces to create an useful application for somebody, there is a vast PHP ecosystem that you could leverage. Just because PHP does not seem like a very nicely designed language should not blind you to the advantages that offers.
Opinions expressed by DZone contributors are their own.