Don't use PHP
It's a huge wet fart.
Some webservers run on Python that might be better. Well, Ruby on rails too, but it's sort of irrelevant and I don't think I'm ever gonna learn Ruby.
https://sansec.io/research/php2shell
Reminds me of Log4Shell and the immediate insanity after the reveal of the exploit.
Glad I wasn't playing Minecraft at this point in my life omg.