I really really think this is asking the wrong question. Sure PHP beat perl at its own game, and really was the master of the CGI style web. But the thing is, that really isn't where the world is anymore. Sure, there is a place for building pages from templates, particularly in piecing together custom splash pages and whatnot, or xml feeds, but honestly, the CGI style web is just going away.<p>Look at what everyone is doing right now: make an app in javascript+html5+css, serve those static files, and feed the app with json. Save bandwidth, scale easier, and just have better control of the display by manipulating the display directly.<p>tl;dr - Nothing will replace PHP, because no one is making tools for that case (file-oriented-web) anymore.