In Java, a Servlet delivers a web page to a client. There are several web servers in PHP that provide the same functionality:
PHP script is similar to JSP. It was designed to be used as a template.
However, PHP overtime was increasingly used not only for templates. Last year, new approaches appeared that used PHP to write the entire web server. For instance.