Results of 1 - 10 of about 27 for loadString (0.001 sec.)
- Load Lua code into the Lua environment 13413
- « LuaSandbox::loadBinary LuaSandbox::pauseUsageTimer » PHP Manual LuaSandbox Load Lua code into the Lua environment 検索 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 the Lua environment. This is the equival ... ent of standard Lua's loadstring() function. パラメータ code Lua code. chunkName Name for the loaded chunk, for use in error traces. 戻り値 Returns a LuaSa ... ding code into Lua <?php // create a new LuaSandbox $sandbox = new LuaSandbox (); // Load the code $function = $sandbox -> loadString ( <<<CODE return "Hello, world" CODE ); // Execute the loaded code var_dump ( $function -> call () ); ?> 上の例の出力は以下 ...
-
https://man.mtool.work/php/8.3/luasandbox.loadstring.html
- Load Lua code into the Lua environment 12360
- « LuaSandbox::loadBinary LuaSandbox::pauseUsageTimer » PHP Manual LuaSandbox Load Lua code into the Lua environment 検索 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 the Lua environment. This is the equival ... ent of standard Lua's loadstring() function. パラメータ code Lua code. chunkName Name for the loaded chunk, for use in error traces. 戻り値 Returns a LuaSa ... ding code into Lua <?php // create a new LuaSandbox $sandbox = new LuaSandbox (); // Load the code $function = $sandbox -> loadString ( <<<CODE return "Hello, world" CODE ); // Execute the loaded code var_dump ( $function -> call () ); ?> 上の例の出力は以下 ...
-
https://man.mtool.work/php/8.3/luasandbox.loadstring.html
- Load a precompiled binary chunk into the Lua environment 9924
- « LuaSandbox::getVersionInfo LuaSandbox::loadString » PHP Manual LuaSandbox Load a precompiled binary chunk into the Lua environment 検索 LuaSandbox::loadBinary (PECL luasandbox >= 1.0.0) LuaSandbox::loadBinary — Load a precompiled binary c
... uaSandboxFunction::dump() . chunkName Name for the loaded function. 戻り値 Returns a LuaSandboxFunction . 参考 LuaSandbox::loadString() - Load Lua code into the Lua environment 関連キーワード: LuaSandbox Lua Load environment LuaSandboxFunction precompiled ... binary chunk loadBinary code loadString function string chunkName dump getVersionInfo Search luasandbox Loads data ...
-
https://man.mtool.work/php/8.3/luasandbox.loadbinary.html
- Load a precompiled binary chunk into the Lua environment 9924
- « LuaSandbox::getVersionInfo LuaSandbox::loadString » PHP Manual LuaSandbox Load a precompiled binary chunk into the Lua environment 検索 LuaSandbox::loadBinary (PECL luasandbox >= 1.0.0) LuaSandbox::loadBinary — Load a precompiled binary c
... uaSandboxFunction::dump() . chunkName Name for the loaded function. 戻り値 Returns a LuaSandboxFunction . 参考 LuaSandbox::loadString() - Load Lua code into the Lua environment 関連キーワード: LuaSandbox Load environment LuaSandboxFunction precompiled bina ... ry chunk loadBinary code loadString chunkName dump getVersionInfo luasandbox Loads loaded 参考 ...
-
https://man.mtool.work/php/8.3/luasandbox.loadbinary.html
- Pause the CPU usage timer 9364
- « LuaSandbox::loadString LuaSandbox::registerLibrary » PHP Manual LuaSandbox Pause the CPU usage timer 検索 LuaSandbox::pauseUsageTimer (PECL luasandbox >= 1.4.0) LuaSandbox::pauseUsageTimer — Pause the CPU usage timer 説明 public function
... UsageTimer (); $sandbox -> unpauseUsageTimer (); doWait ( 1.1 ); } ] ); echo "This should not time out...\n" ; $sandbox -> loadString ( 'php.test()' )-> call (); echo "This should time out.\n" ; try { $sandbox -> loadString ( 'php.test2()' )-> call (); ech ... Timer 関連キーワード: timer LuaSandbox sandbox call usage pauseUsageTimer Lua function php doWait test echo time out Pause loadString callback new paused unpauseUsageTimer registerLibrary ...
-
https://man.mtool.work/php/8.3/luasandbox.pauseusagetimer.html
- Pause the CPU usage timer 9364
- « LuaSandbox::loadString LuaSandbox::registerLibrary » PHP Manual LuaSandbox Pause the CPU usage timer 検索 LuaSandbox::pauseUsageTimer (PECL luasandbox >= 1.4.0) LuaSandbox::pauseUsageTimer — Pause the CPU usage timer 説明 public function
... UsageTimer (); $sandbox -> unpauseUsageTimer (); doWait ( 1.1 ); } ] ); echo "This should not time out...\n" ; $sandbox -> loadString ( 'php.test()' )-> call (); echo "This should time out.\n" ; try { $sandbox -> loadString ( 'php.test2()' )-> call (); ech ... d by LuaSandbox::pauseUsageTimer 関連キーワード: timer LuaSandbox sandbox call usage pauseUsageTimer doWait time out Pause loadString callback paused unpauseUsageTimer registerLibrary execution unpaused calls again second limit setCPULimit microtime luasan ...
-
https://man.mtool.work/php/8.3/luasandbox.pauseusagetimer.html
- Basic usage for LuaSandbox 9117
- « 例 LuaSandbox » PHP Manual 例 Basic usage for LuaSandbox 検索 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 <?ph
... ello, world" ); return "Hi", function ( v ) return php.frobnosticate( v + 200 ) end EOF; list( $hi , $frob ) = $sandbox -> loadString ( $luaCode )-> call (); assert ( $frob -> call ( 4000 ) === [ 4242 ] ); // PHP-thrown LuaSandboxRuntimeError exceptions ca ... n be caught inside Lua list( $ok , $message ) = $sandbox -> loadString ( 'return pcall( php.error )' )-> call (); assert ( ! $ok ); assert ( $message === 'Something is wrong' ); ?> 関連キーワー ... andbox frobnosticate return usage code call assert Execute output LuaSandboxRuntimeError Something wrong luaCode list frob loadString message Once compiled support begin using safely user ...
-
https://man.mtool.work/php/8.3/luasandbox.examples-basic.html
- Unused 8706
- « LuaSandboxFunction::call LuaSandboxFunction::dump » PHP Manual LuaSandboxFunction Unused 検索 LuaSandboxFunction::__construct (PECL luasandbox >= 1.0.0) LuaSandboxFunction::__construct — Unused 説明 final private function LuaSandboxFuncti
... turn value from Lua, as a parameter passed to a callback from Lua, or by using LuaSandbox::wrapPhpFunction() , LuaSandbox::loadString() , or LuaSandbox::loadBinary() . They cannot be constructed directly. パラメータ この関数にはパラメータはありません。 関連 ... ed construct LuaSandbox call dump luasandbox final private obtained return parameter passed callback using wrapPhpFunction loadString loadBinary They cannot constructed directly ...
-
https://man.mtool.work/php/8.3/luasandboxfunction.construct.html
- The LuaSandboxFunction class 8558
- « LuaSandbox::wrapPhpFunction LuaSandboxFunction::call » PHP Manual LuaSandbox The LuaSandboxFunction class 検索 The LuaSandboxFunction class (PECL luasandbox >= 1.0.0) はじめに Represents a Lua function, allowing it to be called from PHP.
... turn value from Lua, as a parameter passed to a callback from Lua, or by using LuaSandbox::wrapPhpFunction() , LuaSandbox::loadString() , or LuaSandbox::loadBinary() . クラス概要 class LuaSandboxFunction { /* メソッド */ public function call ( string ...$a ... LuaSandbox call wrapPhpFunction dump luasandbox Represents allowing called obtained return parameter passed callback using loadString loadBinary 概要 args 目次 Call construct Unused Dump binary ...
-
https://man.mtool.work/php/8.3/class.luasandboxfunction.html
- Set the memory limit for the Lua environment 8229
- « LuaSandbox::setCPULimit LuaSandbox::unpauseUsageTimer » PHP Manual LuaSandbox Set the memory limit for the Lua environment 検索 LuaSandbox::setMemoryLimit (PECL luasandbox >= 1.0.0) LuaSandbox::setMemoryLimit — Set the memory limit for th
... ox = new LuaSandbox (); // set a memory limit $sandbox -> setMemoryLimit ( 50 * 1024 * 1024 ); // Run Lua code $sandbox -> loadString ( 'local x = "x"; while true do x = x .. x; end' )-> call (); ?> 上の例の出力は、 たとえば以下のようになります。 PHP Fatal ... andboxMemoryError Fetch usage unpauseUsageTimer luasandbox Sets exceeded exception thrown Memory bytes Calling create code loadString local while call ...
-
https://man.mtool.work/php/8.3/luasandbox.setmemorylimit.html