A middleware is a kind of callable that accepts three types of arguments- PSR7 request object, a PSR7 response object, and next middleware. A middleware can do all types of functions with objects. However, a middleware MUST initiate next middleware and clear Response and Request objects as arguments.

If you are preparing for Slim interview, you can read our slim framework tutorial for in-depth knowledge.

BY Best Interview Question ON 30 Jan 2019