php settimeout code example
Example 1: settimeout javascript
setTimeout(function(){
console.log("hello");
}, 3000); //wait for atleast 3 seconds before console logging
Example 2: timeout php
<?php
set_time_limit(20);
while ($i<=10)
{
echo "i=$i ";
sleep(100);
$i++;
}
?>
Output:
i=0 i=1 i=2 i=3 i=4 i=5 i=6 i=7 i=8 i=9 i=10