Absolute PHP is not a bad option(if I have to use many crucial factors). It's getting better and getting more popular. It's freelancers best choice to keep a project up and running quickly. It's best choice for scaling when you have very low budget.
It's best when you wanna save money and still does the job better than other programming languages. As API it's as good as others or even better than Javascript or Python.
Recently we have released a Flutter(Google framework) frontend app with backend rest api using Laravel(php framework). It got almost one million view less than 2 years.
After working with GoLang, PHP, Python, I still prefer to use PHP(laravel framework) for my next big projects unless otherwise specified by clients. All of our team members are instructed to use Laravel since money comes quickly. As a developer I care about time and money.
With PHP you get to maintain more. And with PHP 7 and above, of course you get to enjoy the quality code. I maintain three blogs. One using laravel and rest two wordpress. All these three bring huge traffic and dollars.
I care about making money and PHP does it for me. I believe most developers care about making bucks too. So start to love PHP if you still don't love it.