|
LuaSandbox::setCPULimitSet the CPU time limit for the Lua environment Description
public void LuaSandbox::setCPULimit(floatbool
$limit )Sets the CPU time limit for the Lua environment. If the total user and system time used by the environment after the call to this method exceeds this limit, a LuaSandboxTimeoutError exception is thrown. Time used in PHP callbacks is included in the limit. Setting the time limit from a callback while Lua is running causes the timer to be reset, or started if it was not already running.
Parameters
Return ValuesNo value is returned. Examples
Example #1 Calling a Lua function
The above example will output something similar to: PHP Fatal error: Uncaught LuaSandboxTimeoutError: The maximum execution time for this script was exceeded See Also
|