How you can force maximum execution time error in PHP?
We can use sleep function to consume PHP execution time and it will throw PHP error.
<?php
for($i=0; $i<10; $i++)
{
echo $i;
sleep(300); //delay the exicution of the PHP script
}
?>
Tutorials Class - Output Window
Learn more about the similar topics:
Tutorials |
---|
PHP Errors |
Exercises & Assignments |
---|
No Content Found. |
Interview Questions & Answers |
---|
What are the different types of error in PHP? |
How you can force maximum execution time error in PHP? |