Results of 1 - 10 of about 38 for luasandbox (0.001 sec.)
- LuaSandbox | PHP 8.3 11368
- 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
... ironment for running untrusted code. Stock Lua functions were reviewed for security, and several were patched accordingly. LuaSandbox has a PHP interface which is more complex, precise and powerful, but it is less convenient for developers. LuaSandbox supp ... orts only Lua 5.1. It is difficult to change this, because LuaSandbox uses heavily modified Lua standard libraries, and due to the lack of backwards compatibility between major Lua versions. L ... ility with user-supplied scripts. インストール/設定 要件 インストール手順 Differences from Standard Lua 例 Basic usage for LuaSandbox LuaSandbox — The LuaSandbox class LuaSandbox::callFunction — Call a function in a Lua global variable LuaSandbox::disableP ...
-
https://man.mtool.work/php/8.3/book.luasandbox.html
- The LuaSandbox class | PHP 8.3 11336
- 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
... getMemoryUsage (): int public function getPeakMemoryUsage (): int public function getProfilerFunctionReport ( int $units = LuaSandbox::SECONDS ): array public static function getVersionInfo (): array public function loadBinary ( string $code , string $chun ... kName = '' ): LuaSandboxFunction public function loadString ( string $code , string $chunkName = '' ): LuaSandboxFunction public function pauseUsag ... it ( int $limit ): void public function unpauseUsageTimer (): void public function wrapPhpFunction ( callable $function ): LuaSandboxFunction } 定義済み定数 LuaSandbox::SAMPLES Used with LuaSandbox::getProfilerFunctionReport() to return timings in samples. ...
-
https://man.mtool.work/php/8.3/class.luasandbox.html
- LuaSandbox::getProfilerFunctionReport — Fetch profiler data | PHP 8.3 9968
- LuaSandbox::getProfilerFunctionReport (PECL luasandbox >= 1.1.0) LuaSandbox::getProfilerFunctionReport — Fetch profiler data 説明 public function LuaSandbox::getProfilerFunctionReport ( int $units = LuaSandbox::SECONDS ): array For a profil
... ing instance previously started by LuaSandbox::enableProfiler() , get a report of the cost of each function. The measurement unit used for the cost is determined by the ... $units parameter: LuaSandbox::SAMPLES Measure in number of samples. LuaSandbox::SECONDS Measure in seconds of CPU time. LuaSandbox::PERCENT Measure per ... OS X, this function will report the elapsed wall-clock time, not CPU time. 例 例1 Profiling Lua code <?php // create a new LuaSandbox $sandbox = new LuaSandbox (); // Start the profiler $sandbox -> enableProfiler ( 0.01 ); // ... Execute some Lua code here ...
-
https://man.mtool.work/php/8.3/luasandbox.getprofilerfunctionreport.html
- LuaSandbox::getVersionInfo — Return the versions of LuaSandbox and Lua | PHP 8.... 9874
- LuaSandbox::getVersionInfo (PECL luasandbox >= 1.6.0) LuaSandbox::getVersionInfo — Return the versions of LuaSandbox and Lua 説明 public static function LuaSandbox::getVersionInfo (): array Returns the versions of LuaSandbox and Lua. パラメ
... ータ この関数にはパラメータはありません。 戻り値 Returns an array with two keys: element type description LuaSandbox string The version of the LuaSandbox extension. Lua string The library name and version as defined by the LUA_RELEASE macr ...
-
https://man.mtool.work/php/8.3/luasandbox.getversioninfo.html
- LuaSandbox::unpauseUsageTimer — Unpause the timer paused by LuaSandbox::pauseUs... 9874
- 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 LuaSandbox
... andbox::pauseUsageTimer() . パラメータ この関数にはパラメータはありません。 戻り値 値を返しません。 参考 LuaSandbox::pauseUsageTimer() - Pause the CPU usage timer LuaSandbox::setCPULimit() - Set the CPU time limit for the Lua environment ...
-
https://man.mtool.work/php/8.3/luasandbox.unpauseusagetimer.html
- LuaSandbox::setMemoryLimit — Set the memory limit for the Lua environment | PHP... 9544
- 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
... nt. If this limit is exceeded, a LuaSandboxMemoryError exception is thrown. パラメータ limit Memory limit in bytes. 戻り値 値を返しません。 例 例1 Calling a Lua funct ... ion <?php // create a new LuaSandbox $sandbox = new LuaSandbox (); // set a memory limit $sandbox -> setMemoryLimit ( 50 * 1024 * 1024 ); // Run Lua code $sand ... ; while true do x = x .. x; end' )-> call (); ?> 上の例の出力は、 たとえば以下のようになります。 PHP Fatal error: Uncaught LuaSandboxMemoryError: not enough memory 参考 LuaSandbox::getMemoryUsage() - Fetch the current memory usage of the Lua environment Lu ...
-
https://man.mtool.work/php/8.3/luasandbox.setmemorylimit.html
- LuaSandbox::getMemoryUsage — Fetch the current memory usage of the Lua environm... 9135
- LuaSandbox::getMemoryUsage (PECL luasandbox >= 1.0.0) LuaSandbox::getMemoryUsage — Fetch the current memory usage of the Lua environment 説明 public function LuaSandbox::getMemoryUsage (): int Fetches the current memory usage of the Lua env
... ironment. パラメータ この関数にはパラメータはありません。 戻り値 Returns the current memory usage in bytes. 参考 LuaSandbox::getPeakMemoryUsage() - Fetch the peak memory usage of the Lua environment LuaSandbox::getCPUUsage() - Fetch the current C ... PU time usage of the Lua environment LuaSandbox::setMemoryLimit() - Set the memory limit for the Lua environment 他のマニュアルの関連ページ Linux JM clearenv(3) Django 1. ...
-
https://man.mtool.work/php/8.3/luasandbox.getmemoryusage.html
- LuaSandbox::getPeakMemoryUsage — Fetch the peak memory usage of the Lua environ... 9135
- LuaSandbox::getPeakMemoryUsage (PECL luasandbox >= 1.0.0) LuaSandbox::getPeakMemoryUsage — Fetch the peak memory usage of the Lua environment 説明 public function LuaSandbox::getPeakMemoryUsage (): int Fetches the peak memory usage of the L
... ua environment. パラメータ この関数にはパラメータはありません。 戻り値 Returns the peak memory usage in bytes. 参考 LuaSandbox::getMemoryUsage() - Fetch the current memory usage of the Lua environment LuaSandbox::getCPUUsage() - Fetch the current CP ... U time usage of the Lua environment LuaSandbox::setMemoryLimit() - Set the memory limit for the Lua environment 他のマニュアルの関連ページ Linux JM clearenv(3) Django 1. ...
-
https://man.mtool.work/php/8.3/luasandbox.getpeakmemoryusage.html
- LuaSandbox::loadString — Load Lua code into the Lua environment | PHP 8.3 9104
- LuaSandbox::loadString (PECL luasandbox >= 1.0.0) LuaSandbox::loadString — Load Lua code into the Lua environment 説明 public function LuaSandbox::loadString ( string $code , string $chunkName = '' ): LuaSandboxFunction Loads Lua code into
... tring() function. パラメータ code Lua code. chunkName Name for the loaded chunk, for use in error traces. 戻り値 Returns a LuaSandboxFunction which, when executed, will execute the passed $code . 例 例1 Loading code into Lua <?php // create a new LuaSandbo ... x $sandbox = new LuaSandbox (); // Load the code $function = $sandbox -> loadString ( <<<CODE return "Hello, world" CODE ); // Execute the loaded code ... var_dump ( $function -> call () ); ?> 上の例の出力は以下となります。 array(1) { [0]=> string(12) "Hello, world" } 参考 LuaSandbox::registerLibrary() - Register a set of PHP functions as a Lua library LuaSandbox::wrapPhpFunction() - Wrap a PHP callable ...
-
https://man.mtool.work/php/8.3/luasandbox.loadstring.html
- LuaSandbox::disableProfiler — Disable the profiler | PHP 8.3 8899
- LuaSandbox::disableProfiler (PECL luasandbox >= 1.1.0) LuaSandbox::disableProfiler — Disable the profiler 説明 public function LuaSandbox::disableProfiler (): void Disables the profiler. パラメータ この関数にはパラメータはありません。 戻り値
... 値を返しません。 参考 LuaSandbox::enableProfiler() - Enable the profiler. LuaSandbox::getProfilerFunctionReport() - Fetch profiler data 他のマニュアルの関連 ...
-
https://man.mtool.work/php/8.3/luasandbox.disableprofiler.html