Search code examples
phphttpscriptingwebserverlifecycle

Can a PHP file handle multiple requests?


Instead of starting new instances of a PHP script when an HTTP request is received, is there any way for one PHP script to handle multiple requests?


Solution

  • Haven't seen an implementation for http requests for that. All I've been able to accomplish is that you wait for all the requests to come back. You could do this in command line by forking the process and sending it to the background. Or you could utilize Gearman (distributed work) for that.