« PHP 8.3 Manual トップ
著作権 »
per page, with , order by , clip by
Results of 1 - 2 of about 2 for luaCode (0.001 sec.)
Basic usage for LuaSandbox 9357
« 例 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 ... string \n" ; }, 'error' => function () { throw new LuaSandboxRuntimeError ( "Something is wrong" ); } ] ); // Execute some Lua code, including callbacks into PHP and into Lua $luaCode = <<<EOF php.output( "Hello, world" ); return "Hi", function ( v ) re ... turn php.frobnosticate( v + 200 ) end EOF; list( $hi , $frob ) = $sandbox -> loadString ( $luaCode )-> call (); assert ( $frob -> call ( 4000 ) === [ 4242 ] ); // PHP-thrown LuaSandboxRuntimeError exceptions can be caught ... unction 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
Basic usage for LuaSandbox 9357
« 例 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 ... string \n" ; }, 'error' => function () { throw new LuaSandboxRuntimeError ( "Something is wrong" ); } ] ); // Execute some Lua code, including callbacks into PHP and into Lua $luaCode = <<<EOF php.output( "Hello, world" ); return "Hi", function ( v ) re ... turn php.frobnosticate( v + 200 ) end EOF; list( $hi , $frob ) = $sandbox -> loadString ( $luaCode )-> call (); assert ( $frob -> call ( 4000 ) === [ 4242 ] ); // PHP-thrown LuaSandboxRuntimeError exceptions can be caught ... ワード: LuaSandbox sandbox 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
PREV 1 NEXT