In a PHP script that uses PHP sockets, if you call socket_create yet forget to (or intentionally do not) call socket_close(), does the socket automatically close itself at the end of the scripts’ execution or does it remain open even after the script finishes and dies?
I actually want to intentionally keep a socket open; I’m writing a frontend server script that responds to AJAX calls, it uses a certain port to query a backend server application bound to another port. Since I most likely will be receiving multiple calls from multiple users, I wonder if and how I could have multiple instances of the frontend script using the same port, and if/how I could keep a port opened for these multiple instances. Obviously I can’t have each instance calling socket_create on the same port.