what in God's Name could you do in PHP that you can't do in a modern framework?
You can build those things in modern frameworks, it will just be more headache and will feel outdated in 6 months.
Making instant loading and user respecting sites.
Could you give examples of the modern frameworks that you have in mind?
Not have to "build" anything. You edit code and it is already deployed on your dev instance.
Deploying to production is just scp -rv * production:/var/www/
Beautifully simple. No npm build crap.
Don’t confuse php the language with php the way of webmaster 2006 vintage.
Nothing; but PHP, in experienced hands, will be waaay more productive for small-to-medium things. One issue is that experienced hands are increasingly hard to come by. Truly big, complicated things, built by large teams or numbers of teams, teams with a lot of average brains or AIs trained on average brains, will be better off in something like Typescript/React. And everyone wants to work on the big complicated stuff. So the "modern frameworks" will continue to dominate while smaller, more niche shops will wonder why they waste their time.