« PHP 8.3 Manual トップ
著作権 »
per page, with , order by , clip by
Results of 1 - 9 of about 9 for setCPULimit (0.001 sec.)
LuaSandbox::setCPULimit — Set the CPU time limit for the Lua environment | PHP ... 13840
LuaSandbox::setCPULimit (PECL luasandbox >= 1.0.0) LuaSandbox::setCPULimit — Set the CPU time limit for the Lua environment 説明 public function LuaSandbox::setCPULimit ( float | bool $limit ): void Sets the CPU time limit for the Lua envir ... 例1 Calling a Lua function <?php // create a new LuaSandbox $sandbox = new LuaSandbox (); // set a time limit $sandbox -> setCPULimit ( 2 ); // Run Lua code $sandbox -> loadString ( 'while true do end' )-> call (); ?> 上の例の出力は、 たとえば以下のようにな ...
https://man.mtool.work/php/8.3/luasandbox.setcpulimit.html
The LuaSandbox class | PHP 8.3 9329
The LuaSandbox class (PECL luasandbox >= 1.0.0) はじめに The LuaSandbox class creates a Lua environment and allows for execution of Lua code. クラス概要 class LuaSandbox { /* 定数 */ const int SAMPLES = 0 ; const int SECONDS = 1 ; const int ... tion pauseUsageTimer (): bool public function registerLibrary ( string $libname , array $functions ): void public function setCPULimit ( float | bool $limit ): void public function setMemoryLimit ( int $limit ): void public function unpauseUsageTimer (): vo ... mer — Pause the CPU usage timer LuaSandbox::registerLibrary — Register a set of PHP functions as a Lua library LuaSandbox::setCPULimit — Set the CPU time limit for the Lua environment LuaSandbox::setMemoryLimit — Set the memory limit for the Lua environment ...
https://man.mtool.work/php/8.3/class.luasandbox.html
LuaSandbox::pauseUsageTimer — Pause the CPU usage timer | PHP 8.3 9149
LuaSandbox::pauseUsageTimer (PECL luasandbox >= 1.4.0) LuaSandbox::pauseUsageTimer — Pause the CPU usage timer 説明 public function LuaSandbox::pauseUsageTimer (): bool Pauses the CPU usage timer. This only has effect when called from withi ... anipulating the usage timer <?php // create a new LuaSandbox and set a CPU limit $sandbox = new LuaSandbox (); $sandbox -> setCPULimit ( 1 ); function doWait ( $t ) { $end = microtime ( true ) + $t ; while ( microtime ( true ) < $end ) { // waste CPU cycles ... uld not time out... This should time out. It did! The maximum execution time for this script was exceeded 参考 LuaSandbox::setCPULimit() - Set the CPU time limit for the Lua environment LuaSandbox::unpauseUsageTimer() - Unpause the timer paused by LuaSandbo ...
https://man.mtool.work/php/8.3/luasandbox.pauseusagetimer.html
LuaSandbox::unpauseUsageTimer — Unpause the timer paused by LuaSandbox::pauseUs... 8466
LuaSandbox::unpauseUsageTimer (PECL luasandbox >= 1.4.0) LuaSandbox::unpauseUsageTimer — Unpause the timer paused by LuaSandbox::pauseUsageTimer() 説明 public function LuaSandbox::unpauseUsageTimer (): void Unpauses the timer paused by LuaS ... パラメータはありません。 戻り値 値を返しません。 参考 LuaSandbox::pauseUsageTimer() - Pause the CPU usage timer LuaSandbox::setCPULimit() - Set the CPU time limit for the Lua environment 他のマニュアルの関連ページ Linux JM timer_delete(2) Docker docker-compo ...
https://man.mtool.work/php/8.3/luasandbox.unpauseusagetimer.html
The LuaSandboxTimeoutError class | PHP 8.3 8286
The LuaSandboxTimeoutError class (PECL luasandbox >= 1.0.0) はじめに Exception thrown when the configured CPU time limit is exceeded. クラス概要 class LuaSandboxTimeoutError extends LuaSandboxFatalError { /* 継承したプロパティ */ protected ... ): string public function Exception::__toString (): string private function Exception::__clone (): void } 参考 LuaSandbox::setCPULimit() 他のマニュアルの関連ページ Vim vim9class ...
https://man.mtool.work/php/8.3/class.luasandboxtimeouterror.html
LuaSandbox::getCPUUsage — Fetch the current CPU time usage of the Lua environme... 8106
LuaSandbox::getCPUUsage (PECL luasandbox >= 1.0.0) LuaSandbox::getCPUUsage — Fetch the current CPU time usage of the Lua environment 説明 public function LuaSandbox::getCPUUsage (): float Fetches the current CPU time usage of the Lua enviro ... e of the Lua environment LuaSandbox::getPeakMemoryUsage() - Fetch the peak memory usage of the Lua environment LuaSandbox::setCPULimit() - Set the CPU time limit for the Lua environment 他のマニュアルの関連ページ Linux JM clearenv(3) Linux JM environ(7) Duc ...
https://man.mtool.work/php/8.3/luasandbox.getcpuusage.html
LuaSandbox::setMemoryLimit — Set the memory limit for the Lua environment | PHP... 8106
LuaSandbox::setMemoryLimit (PECL luasandbox >= 1.0.0) LuaSandbox::setMemoryLimit — Set the memory limit for the Lua environment 説明 public function LuaSandbox::setMemoryLimit ( int $limit ): void Sets the memory limit for the Lua environme ... e of the Lua environment LuaSandbox::getPeakMemoryUsage() - Fetch the peak memory usage of the Lua environment LuaSandbox::setCPULimit() - Set the CPU time limit for the Lua environment 他のマニュアルの関連ページ Linux JM clearenv(3) DuckDB Known Issues Duc ...
https://man.mtool.work/php/8.3/luasandbox.setmemorylimit.html
Basic usage for LuaSandbox | PHP 8.3 7944
Basic usage for LuaSandbox Once you've compiled PHP with LuaSandbox support, you can begin using LuaSandbox to safely run user-provided Lua code. 例1 Execute some Lua code <?php $sandbox = new LuaSandbox ; $sandbox -> setMemoryLimit ( 50 * ... 1024 * 1024 ); $sandbox -> setCPULimit ( 10 ); // Register some functions in the Lua environment function frobnosticate ( $v ) { return [ $v + 42 ]; } $sandbox - ...
https://man.mtool.work/php/8.3/luasandbox.examples-basic.html
LuaSandbox | PHP 8.3 7585
LuaSandbox はじめに LuaSandbox is an extension for PHP 7 and PHP 8 to allow safely running untrusted Lua 5.1 code from within PHP. Differences compared to the Lua extension: LuaSandbox has support for time and memory limits. LuaSandbox prov ... mer — Pause the CPU usage timer LuaSandbox::registerLibrary — Register a set of PHP functions as a Lua library LuaSandbox::setCPULimit — Set the CPU time limit for the Lua environment LuaSandbox::setMemoryLimit — Set the memory limit for the Lua environment ...
https://man.mtool.work/php/8.3/book.luasandbox.html
PREV 1 NEXT