jd2007 Posted September 2, 2007 Share Posted September 2, 2007 Is there a function in php similar to javascript's setTimeout function ? Quote Link to comment https://forums.phpfreaks.com/topic/67647-is-there-a-function-in-php-similar-to-javascripts-settimeout-function/ Share on other sites More sharing options...
Wuhtzu Posted September 2, 2007 Share Posted September 2, 2007 No. PHP is interpreted server side and then the output is send to the users browser which makes it impossible for PHP to "do something" after 5 seconds. Quote Link to comment https://forums.phpfreaks.com/topic/67647-is-there-a-function-in-php-similar-to-javascripts-settimeout-function/#findComment-339802 Share on other sites More sharing options...
tibberous Posted September 2, 2007 Share Posted September 2, 2007 No. PHP is interpreted server side and then the output is send to the users browser which makes it impossible for PHP to "do something" after 5 seconds. Not necessarily true, and not true. PHP can be ran command line, in which case the output is probably going to be sent to some logs and waiting 5 seconds is a common thing to do. Either way you can wait 5 seconds to do something, just as a web script it will be slow loading Quote Link to comment https://forums.phpfreaks.com/topic/67647-is-there-a-function-in-php-similar-to-javascripts-settimeout-function/#findComment-339943 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.