as past PHP expert, I would highly recommend to not use this language in any production environment.
not sure how long ago your "expert" state is, but, PHP has come along way.
Most recent versions have everything needed. Of course, legacy projects suck. What language are you using now?
But sure, wordpress & laravel did not help the image of PHP. Sure laravel made it popular again, but what they consider "artisan" code, is ridiculous.
And just to be frank, i am highly suspicious of people claiming to be experts in a language without proof they've contributed to the language itself. I am doing this for almost two decades now professionally. I have done almost every mistake you can think of and built so many different things from scratch... i know others consider me an expert, and if someone asks my rate, of course i am an expert. But to be honest, i am still baffled by the confidence of people claiming they're senior after 5 years. And even more so, how fast they get humbled when working with people who really like to get shit done the right way.
---
EDIT: now that i have looked at the code, i must admit, i understand your sentiment. I'd join you on saying: don't run the code of the person who wrote this initially on prod.
The nice thing about PHP is the ease of getting started. Which of course leads to the bad reputation: anyone can start, so anyone will. Hence, so much bad PHP code all around is. But like i said, modern PHP is almost like a different language. I could name many more things, but I doubt anyone here cares, so i stop.
As with everything: try to do it right, or find someone who will. Otherwise, don't waste potential.