PHP is a bad language

Photo by KOBU Agency on Unsplash

PHP is a bad language

Today I had an email asking me whether PHP was a "bad language" and whether they should learn ASP.net instead.

I haven't used ASP.net in years but when I did use it I hated it - it has probably changed greatly over the years but I just didn't get along with it. Could I take on a project on based on ASP.net - yep, but I wouldn't because I wouldn't enjoy the project. It's not a "bad language" at all, just not something I enjoy using.

I first started to use PHP when I jumped from desktop development around 20 years ago and haven't looked back. I'm in no way one of those people who seem to know everything but what I do know is that PHP will do a damn good job of pretty much anything thrown at it.

I've built many different projects in my time, using standard PHP, frameworks like Laraval, CakePHP, CodeIgnitor, Symfony, Slim and many others. I always pick the right tools for the job. I even created my own framework which was the basis of an internal content management system which is still in use today.

So is it a bad language? Short answer would be a definitive no.

I recently took on a project which had already cost the US client close to $100K after taking over a year to build - they asked me to review the code and compile a small report as the original project lead had left the company with them now being responsible for it.

The site was based on PHP and WordPress. Anyway, its safe to say this was the worst website I had ever seen in my life and I wouldn't have paid $100 for it. Nothing was editable so not sure why they used WordPress. There were no coding standards adhered to, indentation was all over the place - it was terrible.

I delivered my report to my client and all they said was "I thought so". I then rebuilt the whole website for them in a month or so.

So why am I bringing this up?

Because PHP is not a bad language, its all down to people being bad developers.

I recently took on another UK client on a development and support basis - first task was to get the project up and running on my Docker server and to check through the code. It was easy to understand, did exactly what it should be doing and was easy to read because there were plenty of comments and indentation, code was uniform throughout. This was an example of a good developer passing on a project to another developer.

tldr; I will build you something which works well, at a reasonable price with code which is easy to understand and maintain going forward.

Every year there is a new kid on the street or a new framework to use but PHP has been there for years and it still there for a reason. Its easy to use, performs well and has a huge following amongst both developers and customers.