October 2005
Intermediate to advanced
372 pages
11h 35m
English
sleep()
int sleep ( int seconds )The sleep() function pauses execution for a set number of seconds, determined by the parameter you provide it. For example:
sleep(4);
echo "Done\n";The maximum script execution time is 30 seconds by default (although you may have changed this by altering the max_execution_time setting inside php.ini), but you can use sleep() to make your scripts go on for longer than that because PHP does not have control during the sleep operation.