Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6672613
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T03:31:44+00:00 2026-05-26T03:31:44+00:00

If I want to suspend code execution in PHP do I use sleep() ?

  • 0

If I want to suspend code execution in PHP do I use sleep()?
If so, what exactly happens on the client side while the number of seconds passed to sleep() are running? Nothing? It just waits for a response from the webserver? Or does it tell the browser – “OK, I got your request, but you will have to wait X seconds until I send you a response.” ?

Thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T03:31:45+00:00Added an answer on May 26, 2026 at 3:31 am

    sleep() simply suspends the script for the specified time interval. Internally it tells the OS “I’m going to sleep, wake me in X seconds”. Unless the PHP script outputs a message to the client-side browser that it is going to sleep, the browser will simply hang until it decides the connection’s dead, the network connection dies from lack of activity, or your script wakes up and resumes operations. sleep() is a purely server-side operation, and does NOT change anything on the client.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

want to know why String behaves like value type while using ==. String s1
Want to code a key pad for an calculator. What I want to make
want to rewrite urls like site.com/software to wp-content/themes/dir/software.php and something is not working.. Here's
So first here is some pseudo code of what I want to improve. public
I want to suspend a void() function that sets a stack variable to true.
I want to suspend (pause) a forked process at startup and resume it later
In my application I want to suspend a button event for some time so
i am using this code for suspend process.i found it here http://www.codeproject.com/KB/threads/pausep.aspx BOOL SuspendResumeThreadList(DWORD
How can I suspend a .NET DataGridView from displaying anything while I update its
I want to make a utility that will allow the system to use the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.