You are able to use it anywhere you want within your code.
Die & Exit
ignore_user_abort() doesn't disable die or exit. It just tells PHP (and the server) to NOT abort the script when the remote users' connection closes.
"PHP will not detect that the user has aborted the connection until an attempt is made to send information to the client. Simply using an echo statement does not guarantee that information is sent, see flush(). " - PHP.Net