« PHP 8.3 Manual トップ
著作権 »
per page, with , order by , clip by
Results of 1 - 2 of about 2 for frob (0.001 sec.)
Basic usage for LuaSandbox 11228
« 例 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 ... moryLimit ( 50 * 1024 * 1024 ); $sandbox -> setCPULimit ( 10 ); // Register some functions in the Lua environment function frobnosticate ( $v ) { return [ $v + 42 ]; } $sandbox -> registerLibrary ( 'php' , [ 'frobnosticate' => 'frobnosticate' , 'outp ... ing callbacks into PHP and into Lua $luaCode = <<<EOF php.output( "Hello, world" ); return "Hi", function ( v ) return php.frobnosticate( v + 200 ) end EOF; list( $hi , $frob ) = $sandbox -> loadString ( $luaCode )-> call (); assert ( $frob -> call ( ... rror )' )-> call (); assert ( ! $ok ); assert ( $message === 'Something is wrong' ); ?> 関連キーワード: LuaSandbox sandbox frobnosticate return usage code call assert Execute output LuaSandboxRuntimeError Something wrong luaCode list frob loadString ...
https://man.mtool.work/php/8.3/luasandbox.examples-basic.html
Basic usage for LuaSandbox 7485
« 例 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 ... moryLimit ( 50 * 1024 * 1024 ); $sandbox -> setCPULimit ( 10 ); // Register some functions in the Lua environment function frobnosticate ( $v ) { return [ $v + 42 ]; } $sandbox -> registerLibrary ( 'php' , [ 'frobnosticate' => 'frobnosticate' , 'outp ... ing callbacks into PHP and into Lua $luaCode = <<<EOF php.output( "Hello, world" ); return "Hi", function ( v ) return php.frobnosticate( v + 200 ) end EOF; list( $hi , $frob ) = $sandbox -> loadString ( $luaCode )-> call (); assert ( $frob -> call ( ... (); assert ( ! $ok ); assert ( $message === 'Something is wrong' ); ?> 関連キーワード: LuaSandbox Lua sandbox php function frobnosticate return usage code call assert Execute new output string error LuaSandboxRuntimeError Something wrong luaCode ...
https://man.mtool.work/php/8.3/luasandbox.examples-basic.html
PREV 1 NEXT