« LuaClosure::__invoke
インストール/設定 »

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 provides a default-safe environment 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 supports 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. LuaSandbox aims to maximise backwards compatibility with user-supplied scripts.

関連キーワード:
LuaSandbox   environment   LuaSandboxFunction   usage   memory   Fetch   code   profiler   extension   running   untrusted   functions   were   compatibility   versions   Call   Load   binary   pauseUsageTimer   timer   LuaSandboxError   LuaSandboxErrorError   LuaSandboxFatalError   LuaSandboxMemoryError   LuaSandboxRuntimeError
関連する関数・ページ:
luasandbox.getpeakmemoryusage   class.luasandbox   luasandbox.getmemoryusage   luasandbox.getcpuusage   luasandbox.loadstring   luasandbox.loadbinary

他のマニュアルの関連ページ