Any Turing complete language can replace another, and they’re all Turing complete. People don’t really use PHP for purely backend stuff but not because it can’t do it. PHP isn’t executed in the browser so it’s always “backend” really, just like Perl (no offense haukex, :P). PHP is quite similar to Perl, it just has a boatload of caveats and redundant functions. And Perl can be used exactly as PHP (Mason and Embperl). The only advantage PHP ever had, and the reason it ate Perl’s web lunch, was they built a deployment plugin for apache that was better for shared hosting than mod_perl (which was as bad as it gets for shared hosting).