Home > PHP > Function > PHP Options/Info > set_time_limit()

set_time_limit()

set_time_limit - Limits the maximum execution time

Syntax

set_time_limit (int $seconds)

Arguments

  • seconds - The maximum execution time, in seconds. If set to zero, no time limit is imposed.

Description

Set the number of seconds a script is allowed to run. If this is reached, the script returns a fatal error. The default limit is 30 seconds or, if it exists, the max_execution_timevalue defined in the php.ini.

Version

PHP 4, 5

Return value

No value is returned.