I assume that there will be more code than you sent - in this case, if you pass any output to the client, the script will not be disabled until it is sent.
Additional shutdown functions may also be logged that you might not be aware of, as indicated in the comments.
, script ( , , ...), -. .