4 ms·
Short answer is no, there's nothing PHP is really suited for anymore where it's a clear and decisive winner in my opinion (which you're free to ignore, but I th
by evilduck 7y ago
Short answer is no, there's nothing PHP is really suited for anymore where it's a clear and decisive winner in my opinion (which you're free to ignore, but I think I have a pretty reasonable opinion having worked on a team that uses PHP for current API work).
For web backend response handling PHP is perfectly _capable_, but there are lots of alternatives that are capable. That's a pretty low bar nowadays and shouldn't be a deciding factor by itself. If you're in a situation with an existing investment in PHP and with a team of productive people already capable and willing to work with PHP, it's not an outrageous decision to keep using PHP. PHP 7 and beyond brought a lot of things that makes the language pragmatic and performant. If you can pretend PHP was invented whole cloth as PHP 7 in like 2016 and completely ignore any and all content related to it that's more than 3 years old, it's generally ok to work with now. If there's a PHP-based COTS product you merely need to install, configure and run then that's also fine.
But... if you're planning on creating a high quality modern PHP codebase correctly with full type hinting, unit and integration tests, robust CI pipelines, making design decisions that maintain code quality long term, etc, etc, you're not really gaining anything by choosing PHP either and might actually be losing out on something else outside the realm of backend web request serving that might have come easier if you had invested your time elsewhere. I find it hard to play devil's advocate for PHP beyond making generalized statements that could apply to Ruby or Javascript as well.