Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP equivalent of Java Servlet

I am trying to understand what's the correspondent of servlets and applets in PHP but I don't have much experience in JAVA.

I want to know what is the equivalent of Java Servlets and JSP in PHP ?

like image 532
Hamed Kamrava Avatar asked May 24 '14 08:05

Hamed Kamrava


1 Answers

In Java the Servlet delivers the web page to the client. In PHP there are multiple web server which delivers the same functionality:

  • Apache2
  • NginX
  • lighttpd

The PHP script is similar to JSP. It was designed to be used as template.

However overtime PHP was used more and more also not only for templates. In the last year there are appearing new approaches where PHP is used to write an entire web server. E.g.

  • appserver.io
  • reactphp
like image 152
Thomas Hunziker Avatar answered Oct 18 '22 22:10

Thomas Hunziker