(PECL luasandbox >= 1.0.0)
LuaSandboxFunction::call — Call a Lua function
Calls a Lua function.
Errors considered to be the fault of the PHP code will result in the
function returning false and E_WARNING
being raised, for example, a resource type being used as an
argument. Lua errors will result in a LuaSandboxRuntimeError
exception being thrown.
PHP and Lua types are converted as follows:
null is Lua nil, and vice versa.
NAN are supported.
-2**53
and 2**53 are converted to PHP ints, with others
being converted to PHP floats.
__pairs and __ipairs are processed.
__index is ignored.
-2**53 and 2**53 are represented
as Lua numbers. All other keys are represented as Lua strings.
$a[0] and $a["0"] as being equivalent).
Lua functions inherently return a list of results. So on success, this method returns an array containing all of the values returned by Lua, with int keys starting from zero. Lua may return no results, in which case an empty array is returned.
args