You won’t be able to run PHP in Tomcat. If you want PHP to behave like it’s running on a Tomcat-type server, you’ll need a web server like Apache or NGINX, or a specialized PHP application server. For the best results and reliability, you should always try to execute code on its supporting application servers.