Sure, but PHP abstracts a load of stuff when you're doing cross-platform stuff - and what's more important, it allows you to keep one language (thus reusing codebase) when you're also doing stuff with web interfaces.
Neither Java, Ruby, Python nor anything else are as simple to setup and resource-friendly to run as a PHP-FCGI+nginx setup.