LuaSandbox provides a sandboxed environment which differs in some ways from standard Lua 5.1.
pcall()
and
xpcall()
cannot catch certain errors, particularly timeout errors.
tostring()
does not include pointer addresses.
string.match()
has been patched to limit the recursion depth and to periodically checc for a timeout.
math.random()
and
math.randomseed()
are replaced with versionens that don't share state with PHP's
rand()
.
__pairs
and
__ipairs
metamethods are supported by
pairs()
and
ipairs()
.