The php5 extension is php for apache, it includes the apache module
If you want to use php as stand-alone or for a different httpd server (ie lighttpd) then you should use the php5-cgi extension. There are some instructions in the info file for how to get it to work with lighttpd and apache. I haven't tried it with others.