I'm a web developer of 25+ years. These days python, php, react, vue stack. Formerly, C, C++, perl and assorted other oddities.
Forget what you once heard about PHP. Modern php is nothing like its early days. Modern php has some great constructs that give language expressiveness and fluidity, and that really lends itself to concise and beautiful code.
PHP also has some brilliant web frameworks (eg: Symfony) that make build web apps (be it REST APIs or frontend backends) just a pleasant experience all around. It's dead simple yet extremely powerful. This makes makes development and maintenance using PHP cheap. PHP's testing suite is also ridiculously powerful.
By comparison, I find python web frameworks (Django, flask etc), fiddly and finnicky to use. I also find Python a much less expressive language. By that I mean it will often take me several lines of code to do something that is otherwise a 1 liner in php. It just feels clunky and awkward.
Don't get me wrong. I once hated and laughed at PHP with the rest of them. But PHP has really evolved over the past 10 years, much more so than python has. I look forward to the day Python has a good hard look at itself.
In the meantime, if I need a backend for a website and I'm given the choice between PHP or Python, I'll choose PHP (symfony) every time.
Besides, PHP devs are cheaper.