Web Developer, Consultant at ConseilsWeb·

Coming from a C/C++ background, I picked up PHP 20 years ago. Today, the language is still in constant evolution while still having a stable base. It powers all of my backend project. It is fast to prototype and get started, and is supported almost everywhere.

Python and Node.js do not provide anything that PHP cannot already offer, so there is no point for me to switch to those language. Mature framework like Laravel provides real ease and speed of development to kick-start any new web project, be it a simple API or a robust ERP running on server-less architecture. There are libraries available for machine learning, crypto, web3 and pretty much anything you can think of.

READ LESS
13 upvotes·2 comments·145.7K views
Garth Michel
Garth Michel
·
February 8th 2022 at 2:35PM

I've been working with PHP for a long time too (in some fashion since 2000). For a long time was a hard advocate for PHP and that there was no reason to ever switch. Now, having worked with Python/NodeJS/Go, my opinion has changed.

For web backends and REST APIs, I'll probably always want to use PHP, it's the language I'm most familiar with and it will take me less time to get up and running. That being said, when it comes to unit testing, Python blows PHP out the water. The ability to inject a Mock into ANYTHING, is extremely powerful and I don't have to jump through hoops, like creating factories, passing everything in via constructors, etc. In PHP. If I want to do effective unit testing in PHP, I have to program around the tests and adapt to the limitations of PHP and dependency injection. In terms of speed, Python and PHP are very similar, there are however a bunch of built in functions that come with PHP that aren't available in Python, namely a lot of the array functions, as well as number formatting / round and the fact that you should NEVER fo maths with floats.

However, when it comes do data processing, nothing in PHP comes close to Pandas (that I know of anyway) and the slew of data processing / machine learning frameworks and libraries that are available in Python, make it way better language to use for that sort of work (I'm not saying the libs aren't there for PHP, they're just not as good or as mature).

If you're working with Microservices that are not using REST, but rather gRPC, I wouldn't use either PHP of Python but rather use something like NodeJS/Go/Rust/etc (anything that has good threading/multiprocess/async functionality).

At the end of the day, there's no better language. You use the right tool for the right job.

·
Reply
Anthony Chiboucas
Anthony Chiboucas
·
February 15th 2022 at 9:47PM

It really depends on what you're doing. PHP's run-time compilation is a major advantage in development and troubleshooting, but it is also hobbling. Python and Node (and many others) allow for many more options, and greater performance. Also, good luck doing anything multi-user reactive.

As long as you're doing a simple web-app, PHP is a great tool. However, there's better ones now.

Most of my career has been PHP, but I'm abandoning it. Why?

The new life-cycle. Laravel is a great example. Any PHP version will only get 3 years, but how will those 3 year breakdown?

0 - 1: Laravel and libraries adapt to incorporate new version.

1 - 2: People using Laravel will finally have stable libraries, and can start dev.

2 - 3: Project launched, features and bugfixes rolled out.

3+ : Project has reached maturity, is finally stable, but now it's insecure and needs a major overhaul EVERY YEAR to keep up with PHP and Laravel.

So long PHP, and thanks for all the fish!

·
Reply
Avatar of Olivier B Deland

Olivier B Deland

Web Developer, Consultant at ConseilsWeb