0

Just wandering how the max_execution_time works. The documentation here states that the option sets:

the maximum time in seconds a script is allowed to run

How does this work for includes/requires?

Example:

file1.php
<?php
  include("file2.php");
  include("file3.php");
?>

file2.php
<?php
  //some script that takes 6 minutes
?>

file3.php
<?php
  echo "hello"
?>

If file2.php takes 6 minutes (and the max_execution_time is set to 5 minutes), does control pass back to file1.php and continue running, or does the whole file quit?

2 Answers 2

1

The execution breaks and throw a error.

Sign up to request clarification or add additional context in comments.

Comments

1

Max execution time is the time your script can be executed. No matter how many includes do you have. So if if at any point of time the script will run out of time, everything will stop and you will receive

Fatal error: Maximum execution time of XX seconds exceeded

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.