Function __global->cms_set_time_limit
Definitions
sources/global3.php
- Set the PHP time limit.You will rarely want to use this standalone, as cms_extend_time_limit is more appropriate.However, in computationally-expensive library code this is useful for restoring the execution time to what it was once your code has finished.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: int
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $secs | integer | No | No | required parameter | N/A | N/A | Number of seconds to set (likely a TIME_LIMIT_EXTEND_* constant) |
Returns
- The old time limit
- Type: integer
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Set the PHP time limit.You will rarely want to use this standalone, as cms_extend_time_limit is more appropriate.However, in computationally-expensive library code this is useful for restoring the execution time to what it was once your code has finished.
*
* @param integer $secs Number of seconds to set (likely a TIME_LIMIT_EXTEND_* constant)
* @return integer The old time limit
*/
function cms_set_time_limit(int $secs) : int
* Set the PHP time limit.You will rarely want to use this standalone, as cms_extend_time_limit is more appropriate.However, in computationally-expensive library code this is useful for restoring the execution time to what it was once your code has finished.
*
* @param integer $secs Number of seconds to set (likely a TIME_LIMIT_EXTEND_* constant)
* @return integer The old time limit
*/
function cms_set_time_limit(int $secs) : int
