Master da Web
Back to Blog

PHP set_time_limit() – Script Execution Time

LucasFebruary 18, 20121 min readUpdated on November 4, 2023
PHP set_time_limit() – Script Execution Time

PHP by default limits the execution time of a script to 30 seconds. If the script exceeds this time limit, the process is “killed”, in other words the process is terminated.

To get around this problem there is the set_time_limit() function, which sets a new maximum execution time for the script, in seconds.

 

Example:

//Define o tempo máximo de execução do script em 60 segundos
set_time_limit(60);

 

For more detailed information, visit the official PHP manual: http://php.net/manual/pt_BR/function.set-time-limit.php

Tags#PHP#script#set_time_limit()
Share

Need Hosting or Servers?

Discover our VPS, dedicated servers and professional hosting solutions

Related Articles

View all articles