By default, the Play Framework uses an embedded HTTP server (based on Netty ). Therefore, the closest analogy to PHP will be that Play is both Apache and PHP.
PHP uses the outdated "CGI-like" paradigm: to serve one HTTP request, your program starts and after the service request is completed it stops. In CGI, to serve an HTTP request, the web server launches an external program - your script - and returns its output. Old versions of PHP were developed only for CGI, in later versions - other ways of interacting with the server, since CGI is very slow, but the basic principle remains the same.
Most web application technologies take a different approach: your web application starts once and then remains running, so one running instance of the web application continues to serve requests (and can handle multiple requests in parallel). It does not die after submitting a single request, as in PHP. This allows you to consume much less resources needed to run the application each time, and only a little more difficult to work, because most of the processing of requests hidden inside the framework and your application should only expose the controller methods that are called when the request is received and the response is returned.
It also provides great flexibility, for example, background processing can be started directly in a web application, without the need for external server processes. The game has Akka library, which is very convenient for this.
As more and more web applications use the Ajax and REST approach, instead of showing heavyweight web pages each time, this becomes more important. And itβs almost impossible to create a real-time instant messaging server with PHP, which will have good performance regardless of the requesting technology (polling, long polling, iframe with multipart).
But when compared to the PHP MVC frameworks, from the point of view of the developer who creates the views, models and controllers, Play is very similar. Both in the PHP MVC frameworks and in the Play Framework, the method or function of the controller is called, and this method should return a response, views are usually templates, and models are usually ORM bindings to a relational database.