If you use Apache as your web server, PHP will not start until the request completes. Thus, the load limit only takes effect after the complete download. Apache first receives the entire request, and only then does it call the appropriate handler (in this case, PHP). Since the server engine does not cancel the current HTTP request and returns a response, you need to wait for the completion of the entire request.
So, to answer your question: NO , the download will go through completely; PHP's internal logic will check the size of the downloaded file, see that it is over the limit, and then immediately with an error. Your PHP script will not get a chance to run, so do not rely on runtime checks - they will not be executed at all.
Piskvor
source share