Is there a PHP equivalent to setting timeouts in JavaScript?
In JavaScript you can execute code after certain time has elapsed using the set time out function.
You can use the sleep() function:
int sleep ( int $seconds ) // Delays the program execution for the given number of seconds.
Example:
public function sleep(){ sleep(1); return 'slept for 1 second'; }