Hmm.. well u cant compare PHP with CGI directly.. coz PHP is a scripting language wheras CGI is a Technology or Interface.. It just acts as a Gateway..
But anyway, PHP rules.. CGI based programs ruled the net once upon a time.. But they cause too much load on server..
PHP is widely used these days,, and the cost of Linux Webspace is lot lower than Windows or Java hosting.. This fact adds more advantage to opting PHP..
Well, but other conidtions like cost, being same for all types of hosting, my choice wud be JSP/servlets.. OMG>. Just too much functionality.. too easy to work with... usage of APIs.. really cool..