DEV Community

Discussion on: Do developers still use PHP?

Collapse
 
juststevemcd profile image
Steve McDougall

I've been using PHP for perhaps the past 12 years or so? To start with I used it out of need, agencies were using PHP systems (Wordpress, Joomla, Magento) and then moved to companies that has pre existing products built in a variety of frameworks.

But after spending the last 12 years as a PHP developer, learning other languages along the way such as python, objective C, swift, Ruby, GoLang etc - I still reach for PHP when I'm building for the web. Why? Because it works, it's fast to do things in, and it's a lot better than people remember. We aren't in PHP 4 or 5 days anymore, we have a mature OOP approach and a fantastic ecosystem for packages and distribution, PHP 8 alone introduced my absolutely incredible features and speed improvements.

With all of the above being said, when it comes to serverless tech, where I am paying per 100millisecinds a program is running - I would lean away from PHP. It's great don't get me wrong, but it's not as fast as something like GoLang. I've built massive warehouse and distribution systems in serverless Go Lang and while it takes longer it's worth the time investment. If I'd built these systems in serverless PHP, the billing would escalate, as PHP takes longer, q simple fact. This is coming from a PHP advocate.

PHP does not belong in a serverless environment in my eyes, unless we are talking about a dockerized environment that runs when required such as Google Cloud Run - but lambda, no.

PHP is web, it's great at web, it's reliable and works well at web, it's not optimized for anything other than web interactions (apart from handy small CLI apps).

Just because you can do something doesn't mean you should do it. You choose the language that works for you, and works for your requirements, if that is PHP great if it isn't PHP that's fine also.