Saturday, 18 April 2015

What is the use of sleep() function ?

The sleep() function delays execution of the current script for a specified number of seconds.

Example 
<?php
echo date('h:i:s') . "<br>";

//sleep for 5 seconds
sleep(5);

//start again
echo date('h:i:s');
?>

No comments:

Post a Comment