jd2007 Posted September 2, 2007 Share Posted September 2, 2007 Is there a function in php similar to javascript's setTimeout function ? 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. 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 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
Archived
This topic is now archived and is closed to further replies.