略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: 简介

2024-11-14

简介

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.

add a noteadd a note

User Contributed Notes

There are no user contributed notes for this page.

官方地址:https://www.php.net/manual/en/intro.luasandbox.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3