Php will never be able to shake off its legacy. It’s a lost cause imo. Which is a shame since it’s faster than most (all?) languages in common use for backend development of websites.
It's unbelievably improved from the days where you could write spaghetti code.. they really put a lot of effort into beat practices.