Jump to content

Question about sleep() function?


jeboy

Recommended Posts

We know that sleep() function will delay the script execution, now I would like to ask if what will happened if for example, at certain condition the script pauses for a moment (e.g. 60 seconds) then halfway of the pause duration, I refreshed the page or revisited the page, what will happen to the script? Does sleep() function continues?

Link to comment
https://forums.phpfreaks.com/topic/110359-question-about-sleep-function/
Share on other sites

well actually, sleep is on the server side... once the page has been refreshed which is on the client-side, it will send a new request to the server and the script will parsed again right from the start.

 

that's my opinion though since i haven't used sleep before. making the server sleep for 60secs... why would you need one? may i know?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.