The question sort of says it all – is there a function which does the same as the JavaScript function setTimeout() for PHP? I’ve searched php.net, and I can’t seem to find any…
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
There is no way to delay execution of part of the code of in the current script. It wouldn’t make much sense, either, as the processing of a PHP script takes place entirely on server side and you would just delay the overall execution of the script. There is
sleep()but that will simply halt the process for a certain time.You can, of course, schedule a PHP script to run at a specific time using cron jobs and the like.