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

maximum execution time error in php


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?