php5 installs both mod_php(5) and php-cgi.
If you only want the cgi (I'm guessing since you mentioned nginx and lighttpd), install php5-cgi.
php5 installs both mod_php(5) and php-cgi.
If you only want the cgi (I'm guessing since you mentioned nginx and lighttpd), install php5-cgi.