Thanks for the reply. However, in this case what I want to do is send some text as a response, close the connection and then carry on executing some code.
The reason I want to do this has to do with the client, which in this case is not a web browser but a cusom http client for a specific application. I want to close the connection from php so that the php app can continue processing code asynchronously from the http client.