[DOC-CVS] [doc-en] master: luasandbox: fix XML to remove useless wrapping para tags via script
[email protected] (Gina Peter Banyard)
| Newsgroups | php.doc.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: Gina Peter Banyard (Girgias)
Date: 2026-01-19T02:53:26Z
Commit: https://github.com/php/doc-en/commit/cc1fd3979ee4c308ca9c086583c4d0e45549d3fe
Raw diff: https://github.com/php/doc-en/commit/cc1fd3979ee4c308ca9c086583c4d0e45549d3fe.diff
luasandbox: fix XML to remove useless wrapping para tags via script
Changed paths:
M reference/luasandbox/differences.xml
M reference/luasandbox/examples.xml
M reference/luasandbox/luasandbox/callfunction.xml
M reference/luasandbox/luasandbox/disableprofiler.xml
M reference/luasandbox/luasandbox/enableprofiler.xml
M reference/luasandbox/luasandbox/getcpuusage.xml
M reference/luasandbox/luasandbox/getmemoryusage.xml
M reference/luasandbox/luasandbox/getpeakmemoryusage.xml
M reference/luasandbox/luasandbox/getprofilerfunctionreport.xml
M reference/luasandbox/luasandbox/getversioninfo.xml
M reference/luasandbox/luasandbox/loadbinary.xml
M reference/luasandbox/luasandbox/loadstring.xml
M reference/luasandbox/luasandbox/pauseusagetimer.xml
M reference/luasandbox/luasandbox/registerlibrary.xml
M reference/luasandbox/luasandbox/setcpulimit.xml
M reference/luasandbox/luasandbox/setmemorylimit.xml
M reference/luasandbox/luasandbox/unpauseusagetimer.xml
M reference/luasandbox/luasandbox/wrapphpfunction.xml
M reference/luasandbox/luasandboxfunction/call.xml
M reference/luasandbox/luasandboxmemoryerror.xml
M reference/luasandbox/luasandboxtimeouterror.xml
Diff:
diff --git a/reference/luasandbox/differences.xml b/reference/luasandbox/differences.xml
index 7bf93c3dc2f6..9701f276c99c 100644
--- a/reference/luasandbox/differences.xml
+++ b/reference/luasandbox/differences.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<chapter xml:id="reference.luasandbox.differences" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
+<chapter xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="reference.luasandbox.differences">
<title>Differences from Standard Lua</title>
<para>
@@ -9,105 +9,96 @@
<simplesect xml:id="reference.luasandbox.differences.unavailable">
<title>Features that are not available</title>
- <para>
- <itemizedlist>
- <listitem>
- <para>
- <literal>dofile()</literal>, <literal>loadfile()</literal>, and the <literal>io</literal> package, as they allow direct filesystem access. If needed, filesystem access should be done via PHP callbacks.
- </para>
- </listitem>
- <listitem>
- <para>
- The <literal>package</literal> package, including <literal>require()</literal> and <literal>module()</literal>, as it depends heavily on direct filesystem access. A pure-Lua rewrite such as that used in the MediaWiki Scribunto extension may be used instead.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>load()</literal> and <literal>loadstring()</literal>, to allow for static analysis of Lua code.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>print()</literal>, since it outputs to standard output. If needed, output should be done via PHP callbacks.
- </para>
- </listitem>
- <listitem>
- <para>
- Most of the <literal>os</literal> package, as it allows manipulation of the process and executing of other processes.
- </para>
- <para>
- <itemizedlist>
- <listitem>
- <para>
- <literal>os.clock()</literal>, <literal>os.date()</literal>, <literal>os.difftime()</literal>, and <literal>os.time()</literal> remain available.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- </listitem>
- <listitem>
- <para>
- Most of the <literal>debug</literal> package, as it allows manipulation of Lua state and metadata in ways that can break sandboxing.
- </para>
- <para>
- <itemizedlist>
- <listitem>
- <para>
- <literal>debug.traceback()</literal> remains available.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>string.dump()</literal>, as it may expose internal data.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>collectgarbage()</literal>, <literal>gcinfo()</literal>, and the <literal>coroutine</literal> package have not been reviewed for security.
- </para>
- </listitem>
- </itemizedlist>
- </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>dofile()</literal>, <literal>loadfile()</literal>, and the <literal>io</literal> package, as they allow direct filesystem access. If needed, filesystem access should be done via PHP callbacks.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ The <literal>package</literal> package, including <literal>require()</literal> and <literal>module()</literal>, as it depends heavily on direct filesystem access. A pure-Lua rewrite such as that used in the MediaWiki Scribunto extension may be used instead.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>load()</literal> and <literal>loadstring()</literal>, to allow for static analysis of Lua code.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>print()</literal>, since it outputs to standard output. If needed, output should be done via PHP callbacks.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Most of the <literal>os</literal> package, as it allows manipulation of the process and executing of other processes.
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>os.clock()</literal>, <literal>os.date()</literal>, <literal>os.difftime()</literal>, and <literal>os.time()</literal> remain available.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </listitem>
+ <listitem>
+ <para>
+ Most of the <literal>debug</literal> package, as it allows manipulation of Lua state and metadata in ways that can break sandboxing.
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>debug.traceback()</literal> remains available.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>string.dump()</literal>, as it may expose internal data.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>collectgarbage()</literal>, <literal>gcinfo()</literal>, and the <literal>coroutine</literal> package have not been reviewed for security.
+ </para>
+ </listitem>
+ </itemizedlist>
</simplesect>
<simplesect xml:id="reference.luasandbox.differences.modified">
<title>Features that have been modified</title>
- <para>
- <itemizedlist>
- <listitem>
- <para>
- <literal>pcall()</literal> and <literal>xpcall()</literal> cannot catch certain errors, particularly timeout errors.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>tostring()</literal> does not include pointer addresses.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>string.match()</literal> has been patched to limit the recursion depth and to periodically check for a timeout.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>math.random()</literal> and <literal>math.randomseed()</literal> are replaced with versions that don't share state with PHP's <literal>rand()</literal>.
- </para>
- </listitem>
- <listitem>
- <para>
- The Lua 5.2 <literal>__pairs</literal> and <literal>__ipairs</literal> metamethods are supported by <literal>pairs()</literal> and <literal>ipairs()</literal>.
- </para>
- </listitem>
- </itemizedlist>
- </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>pcall()</literal> and <literal>xpcall()</literal> cannot catch certain errors, particularly timeout errors.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>tostring()</literal> does not include pointer addresses.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>string.match()</literal> has been patched to limit the recursion depth and to periodically check for a timeout.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>math.random()</literal> and <literal>math.randomseed()</literal> are replaced with versions that don't share state with PHP's <literal>rand()</literal>.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ The Lua 5.2 <literal>__pairs</literal> and <literal>__ipairs</literal> metamethods are supported by <literal>pairs()</literal> and <literal>ipairs()</literal>.
+ </para>
+ </listitem>
+ </itemizedlist>
</simplesect>
</chapter>
-
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
diff --git a/reference/luasandbox/examples.xml b/reference/luasandbox/examples.xml
index 4bf85bf73900..797a2e23a9c7 100644
--- a/reference/luasandbox/examples.xml
+++ b/reference/luasandbox/examples.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-
-<chapter xml:id="luasandbox.examples" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
+<chapter xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="luasandbox.examples">
&reftitle.examples;
<!-- Add one or more of these <section>'s, with one ore more <example>'s -->
@@ -11,10 +10,9 @@
<para>
Once you've compiled PHP with LuaSandbox support, you can begin using LuaSandbox to safely run user-provided Lua code.
</para>
- <para>
- <example>
- <title>Execute some Lua code</title>
- <programlisting role="php" xml:id="luasandbox.examples.uniqueidhere">
+ <example>
+ <title>Execute some Lua code</title>
+ <programlisting role="php" xml:id="luasandbox.examples.uniqueidhere">
<![CDATA[
<?php
@@ -59,13 +57,11 @@ assert( $message === 'Something is wrong' );
?>
]]>
- </programlisting>
- </example>
- </para>
+ </programlisting>
+ </example>
</section>
</chapter>
-
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
@@ -86,4 +82,3 @@ vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
-
diff --git a/reference/luasandbox/luasandbox/callfunction.xml b/reference/luasandbox/luasandbox/callfunction.xml
index 58f15ecf8fa8..ede7b032afce 100644
--- a/reference/luasandbox/luasandbox/callfunction.xml
+++ b/reference/luasandbox/luasandbox/callfunction.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-
-<refentry xml:id="luasandbox.callfunction" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="luasandbox.callfunction">
<refnamediv>
<refname>LuaSandbox::callFunction</refname>
<refpurpose>Call a function in a Lua global variable</refpurpose>
@@ -62,10 +61,9 @@
<refsect1 role="examples">
&reftitle.examples;
- <para>
- <example>
- <title>Calling a Lua function</title>
- <programlisting role="php">
+ <example>
+ <title>Calling a Lua function</title>
+ <programlisting role="php">
<![CDATA[
<?php
@@ -77,13 +75,11 @@ $captures = $sandbox->callFunction( 'string.match', $string, $pattern );
?>
]]>
- </programlisting>
- </example>
- </para>
+ </programlisting>
+ </example>
</refsect1>
</refentry>
-
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
diff --git a/reference/luasandbox/luasandbox/disableprofiler.xml b/reference/luasandbox/luasandbox/disableprofiler.xml
index ad2634514168..b7d7bd12297e 100644
--- a/reference/luasandbox/luasandbox/disableprofiler.xml
+++ b/reference/luasandbox/luasandbox/disableprofiler.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-
-<refentry xml:id="luasandbox.disableprofiler" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="luasandbox.disableprofiler">
<refnamediv>
<refname>LuaSandbox::disableProfiler</refname>
<refpurpose>Disable the profiler</refpurpose>
@@ -11,7 +10,7 @@
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>void</type><methodname>LuaSandbox::disableProfiler</methodname>
- <void />
+ <void/>
</methodsynopsis>
<para>
Disables the profiler.
@@ -33,16 +32,13 @@
<refsect1 role="seealso">
&reftitle.seealso;
- <para>
- <simplelist>
- <member><methodname>LuaSandbox::enableProfiler</methodname></member>
- <member><methodname>LuaSandbox::getProfilerFunctionReport</methodname></member>
- </simplelist>
- </para>
+ <simplelist>
+ <member><methodname>LuaSandbox::enableProfiler</methodname></member>
+ <member><methodname>LuaSandbox::getProfilerFunctionReport</methodname></member>
+ </simplelist>
</refsect1>
</refentry>
-
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
diff --git a/reference/luasandbox/luasandbox/enableprofiler.xml b/reference/luasandbox/luasandbox/enableprofiler.xml
index 79de48eba42e..412dd0908e27 100644
--- a/reference/luasandbox/luasandbox/enableprofiler.xml
+++ b/reference/luasandbox/luasandbox/enableprofiler.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-
-<refentry xml:id="luasandbox.enableprofiler" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="luasandbox.enableprofiler">
<refnamediv>
<refname>LuaSandbox::enableProfiler</refname>
<refpurpose>Enable the profiler.</refpurpose>
@@ -48,16 +47,13 @@
<refsect1 role="seealso">
&reftitle.seealso;
- <para>
- <simplelist>
- <member><methodname>LuaSandbox::disableProfiler</methodname></member>
- <member><methodname>LuaSandbox::getProfilerFunctionReport</methodname></member>
- </simplelist>
- </para>
+ <simplelist>
+ <member><methodname>LuaSandbox::disableProfiler</methodname></member>
+ <member><methodname>LuaSandbox::getProfilerFunctionReport</methodname></member>
+ </simplelist>
</refsect1>
</refentry>
-
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
diff --git a/reference/luasandbox/luasandbox/getcpuusage.xml b/reference/luasandbox/luasandbox/getcpuusage.xml
index 9040874bf187..f53c45d153f4 100644
--- a/reference/luasandbox/luasandbox/getcpuusage.xml
+++ b/reference/luasandbox/luasandbox/getcpuusage.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-
-<refentry xml:id="luasandbox.getcpuusage" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="luasandbox.getcpuusage">
<refnamediv>
<refname>LuaSandbox::getCPUUsage</refname>
<refpurpose>Fetch the current CPU time usage of the Lua environment</refpurpose>
@@ -11,7 +10,7 @@
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>float</type><methodname>LuaSandbox::getCPUUsage</methodname>
- <void />
+ <void/>
</methodsynopsis>
<para>
Fetches the current CPU time usage of the Lua environment.
@@ -44,17 +43,14 @@
<refsect1 role="seealso">
&reftitle.seealso;
- <para>
- <simplelist>
- <member><methodname>LuaSandbox::getMemoryUsage</methodname></member>
- <member><methodname>LuaSandbox::getPeakMemoryUsage</methodname></member>
- <member><methodname>LuaSandbox::setCPULimit</methodname></member>
- </simplelist>
- </para>
+ <simplelist>
+ <member><methodname>LuaSandbox::getMemoryUsage</methodname></member>
+ <member><methodname>LuaSandbox::getPeakMemoryUsage</methodname></member>
+ <member><methodname>LuaSandbox::setCPULimit</methodname></member>
+ </simplelist>
</refsect1>
</refentry>
-
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
diff --git a/reference/luasandbox/luasandbox/getmemoryusage.xml b/reference/luasandbox/luasandbox/getmemoryusage.xml
index c630656d7eb6..86336d7998b5 100644
--- a/reference/luasandbox/luasandbox/getmemoryusage.xml
+++ b/reference/luasandbox/luasandbox/getmemoryusage.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-
-<refentry xml:id="luasandbox.getmemoryusage" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="luasandbox.getmemoryusage">
<refnamediv>
<refname>LuaSandbox::getMemoryUsage</refname>
<refpurpose>Fetch the current memory usage of the Lua environment</refpurpose>
@@ -11,7 +10,7 @@
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>int</type><methodname>LuaSandbox::getMemoryUsage</methodname>
- <void />
+ <void/>
</methodsynopsis>
<para>
Fetches the current memory usage of the Lua environment.
@@ -33,17 +32,14 @@
<refsect1 role="seealso">
&reftitle.seealso;
- <para>
- <simplelist>
- <member><methodname>LuaSandbox::getPeakMemoryUsage</methodname></member>
- <member><methodname>LuaSandbox::getCPUUsage</methodname></member>
- <member><methodname>LuaSandbox::setMemoryLimit</methodname></member>
- </simplelist>
- </para>
+ <simplelist>
+ <member><methodname>LuaSandbox::getPeakMemoryUsage</methodname></member>
+ <member><methodname>LuaSandbox::getCPUUsage</methodname></member>
+ <member><methodname>LuaSandbox::setMemoryLimit</methodname></member>
+ </simplelist>
</refsect1>
</refentry>
-
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
diff --git a/reference/luasandbox/luasandbox/getpeakmemoryusage.xml b/reference/luasandbox/luasandbox/getpeakmemoryusage.xml
index 579053dcfd2e..ec3f11406b40 100644
--- a/reference/luasandbox/luasandbox/getpeakmemoryusage.xml
+++ b/reference/luasandbox/luasandbox/getpeakmemoryusage.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-
-<refentry xml:id="luasandbox.getpeakmemoryusage" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="luasandbox.getpeakmemoryusage">
<refnamediv>
<refname>LuaSandbox::getPeakMemoryUsage</refname>
<refpurpose>Fetch the peak memory usage of the Lua environment</refpurpose>
@@ -11,7 +10,7 @@
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>int</type><methodname>LuaSandbox::getPeakMemoryUsage</methodname>
- <void />
+ <void/>
</methodsynopsis>
<para>
Fetches the peak memory usage of the Lua environment.
@@ -33,17 +32,14 @@
<refsect1 role="seealso">
&reftitle.seealso;
- <para>
- <simplelist>
- <member><methodname>LuaSandbox::getMemoryUsage</methodname></member>
- <member><methodname>LuaSandbox::getCPUUsage</methodname></member>
- <member><methodname>LuaSandbox::setMemoryLimit</methodname></member>
- </simplelist>
- </para>
+ <simplelist>
+ <member><methodname>LuaSandbox::getMemoryUsage</methodname></member>
+ <member><methodname>LuaSandbox::getCPUUsage</methodname></member>
+ <member><methodname>LuaSandbox::setMemoryLimit</methodname></member>
+ </simplelist>
</refsect1>
</refentry>
-
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
diff --git a/reference/luasandbox/luasandbox/getprofilerfunctionreport.xml b/reference/luasandbox/luasandbox/getprofilerfunctionreport.xml
index 28ecd13f57ff..c78a9aef1e5a 100644
--- a/reference/luasandbox/luasandbox/getprofilerfunctionreport.xml
+++ b/reference/luasandbox/luasandbox/getprofilerfunctionreport.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-
-<refentry xml:id="luasandbox.getprofilerfunctionreport" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="luasandbox.getprofilerfunctionreport">
<refnamediv>
<refname>LuaSandbox::getProfilerFunctionReport</refname>
<refpurpose>Fetch profiler data</refpurpose>
@@ -22,22 +21,20 @@
The measurement unit used for the cost is determined by the
<varname>$units</varname> parameter:
</para>
- <para>
- <variablelist>
- <varlistentry>
- <term><constant>LuaSandbox::SAMPLES</constant></term>
- <listitem><para>Measure in number of samples.</para></listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>LuaSandbox::SECONDS</constant></term>
- <listitem><para>Measure in seconds of CPU time.</para></listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>LuaSandbox::PERCENT</constant></term>
- <listitem><para>Measure percentage of CPU time.</para></listitem>
- </varlistentry>
- </variablelist>
- </para>
+ <variablelist>
+ <varlistentry>
+ <term><constant>LuaSandbox::SAMPLES</constant></term>
+ <listitem><para>Measure in number of samples.</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><constant>LuaSandbox::SECONDS</constant></term>
+ <listitem><para>Measure in seconds of CPU time.</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><constant>LuaSandbox::PERCENT</constant></term>
+ <listitem><para>Measure percentage of CPU time.</para></listitem>
+ </varlistentry>
+ </variablelist>
</refsect1>
<refsect1 role="parameters">
@@ -74,10 +71,9 @@
<refsect1 role="examples">
&reftitle.examples;
- <para>
- <example>
- <title>Profiling Lua code</title>
- <programlisting role="php">
+ <example>
+ <title>Profiling Lua code</title>
+ <programlisting role="php">
<![CDATA[
<?php
@@ -94,13 +90,11 @@ $data = $sandbox->getProfilerFunctionReport();
?>
]]>
- </programlisting>
- </example>
- </para>
+ </programlisting>
+ </example>
</refsect1>
</refentry>
-
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
diff --git a/reference/luasandbox/luasandbox/getversioninfo.xml b/reference/luasandbox/luasandbox/getversioninfo.xml
index 22af49279e5b..0d35d7976279 100644
--- a/reference/luasandbox/luasandbox/getversioninfo.xml
+++ b/reference/luasandbox/luasandbox/getversioninfo.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-
-<refentry xml:id="luasandbox.getversioninfo" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="luasandbox.getversioninfo">
<refnamediv>
<refname>LuaSandbox::getVersionInfo</refname>
<refpurpose>Return the versions of LuaSandbox and Lua</refpurpose>
@@ -11,7 +10,7 @@
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <modifier>static</modifier> <type>array</type><methodname>LuaSandbox::getVersionInfo</methodname>
- <void />
+ <void/>
</methodsynopsis>
<para>
Returns the versions of LuaSandbox and Lua.
@@ -29,31 +28,28 @@
<para>
Returns an array with two keys:
</para>
- <para>
- <informaltable>
- <tgroup cols="3">
- <thead>
- <row><entry>element</entry><entry>type</entry><entry>description</entry></row>
- </thead>
- <tbody>
- <row>
- <entry>LuaSandbox</entry>
- <entry><type>string</type></entry>
- <entry>The version of the LuaSandbox extension.</entry>
- </row>
- <row>
- <entry>Lua</entry>
- <entry><type>string</type></entry>
- <entry>The library name and version as defined by the LUA_RELEASE macro, for example, "Lua 5.1.5".</entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- </para>
+ <informaltable>
+ <tgroup cols="3">
+ <thead>
+ <row><entry>element</entry><entry>type</entry><entry>description</entry></row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>LuaSandbox</entry>
+ <entry><type>string</type></entry>
+ <entry>The version of the LuaSandbox extension.</entry>
+ </row>
+ <row>
+ <entry>Lua</entry>
+ <entry><type>string</type></entry>
+ <entry>The library name and version as defined by the LUA_RELEASE macro, for example, "Lua 5.1.5".</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
</refsect1>
</refentry>
-
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
diff --git a/reference/luasandbox/luasandbox/loadbinary.xml b/reference/luasandbox/luasandbox/loadbinary.xml
index 22309b2387cf..a38ff86f297d 100644
--- a/reference/luasandbox/luasandbox/loadbinary.xml
+++ b/reference/luasandbox/luasandbox/loadbinary.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-
-<refentry xml:id="luasandbox.loadbinary" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="luasandbox.loadbinary">
<refnamediv>
<refname>LuaSandbox::loadBinary</refname>
<refpurpose>Load a precompiled binary chunk into the Lua environment</refpurpose>
@@ -50,15 +49,12 @@
<refsect1 role="seealso">
&reftitle.seealso;
- <para>
- <simplelist>
- <member><methodname>LuaSandbox::loadString</methodname></member>
- </simplelist>
- </para>
+ <simplelist>
+ <member><methodname>LuaSandbox::loadString</methodname></member>
+ </simplelist>
</refsect1>
</refentry>
-
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
diff --git a/reference/luasandbox/luasandbox/loadstring.xml b/reference/luasandbox/luasandbox/loadstring.xml
index 49716034eb7a..62025e44f81f 100644
--- a/reference/luasandbox/luasandbox/loadstring.xml
+++ b/reference/luasandbox/luasandbox/loadstring.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-
-<refentry xml:id="luasandbox.loadstring" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="luasandbox.loadstring">
<refnamediv>
<refname>LuaSandbox::loadString</refname>
<refpurpose>Load Lua code into the Lua environment</refpurpose>
@@ -54,10 +53,9 @@
<refsect1 role="examples">
&reftitle.examples;
- <para>
- <example>
- <title>Loading code into Lua</title>
- <programlisting role="php">
+ <example>
+ <title>Loading code into Lua</title>
+ <programlisting role="php">
<![CDATA[
<?php
@@ -76,32 +74,28 @@ var_dump( $function->call() );
?>
]]>
- </programlisting>
- &example.outputs;
- <screen>
+ </programlisting>
+ &example.outputs;
+ <screen>
<![CDATA[
array(1) {
[0]=>
string(12) "Hello, world"
}
]]>
- </screen>
- </example>
- </para>
+ </screen>
+ </example>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
- <para>
- <simplelist>
- <member><methodname>LuaSandbox::registerLibrary</methodname></member>
- <member><methodname>LuaSandbox::wrapPhpFunction</methodname></member>
- </simplelist>
- </para>
+ <simplelist>
+ <member><methodname>LuaSandbox::registerLibrary</methodname></member>
+ <member><methodname>LuaSandbox::wrapPhpFunction</methodname></member>
+ </simplelist>
</refsect1>
</refentry>
-
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
diff --git a/reference/luasandbox/luasandbox/pauseusagetimer.xml b/reference/luasandbox/luasandbox/pauseusagetimer.xml
index bb6ebbf04cd0..35f6af4d9f9b 100644
--- a/reference/luasandbox/luasandbox/pauseusagetimer.xml
+++ b/reference/luasandbox/luasandbox/pauseusagetimer.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-
-<refentry xml:id="luasandbox.pauseusagetimer" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="luasandbox.pauseusagetimer">
<refnamediv>
<refname>LuaSandbox::pauseUsageTimer</refname>
<refpurpose>Pause the CPU usage timer</refpurpose>
@@ -11,7 +10,7 @@
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>bool</type><methodname>LuaSandbox::pauseUsageTimer</methodname>
- <void />
+ <void/>
</methodsynopsis>
<para>
Pauses the CPU usage timer.
@@ -45,10 +44,9 @@
<refsect1 role="examples">
&reftitle.examples;
- <para>
- <example>
- <title>Manipulating the usage timer</title>
- <programlisting role="php">
+ <example>
+ <title>Manipulating the usage timer</title>
+ <programlisting role="php">
<![CDATA[
<?php
@@ -92,31 +90,27 @@ try {
?>
]]>
- </programlisting>
- &example.outputs;
- <screen>
+ </programlisting>
+ &example.outputs;
+ <screen>
<![CDATA[
This should not time out...
This should time out.
It did! The maximum execution time for this script was exceeded
]]>
- </screen>
- </example>
- </para>
+ </screen>
+ </example>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
- <para>
- <simplelist>
- <member><methodname>LuaSandbox::setCPULimit</methodname></member>
- <member><methodname>LuaSandbox::unpauseUsageTimer</methodname></member>
- </simplelist>
- </para>
+ <simplelist>
+ <member><methodname>LuaSandbox::setCPULimit</methodname></member>
+ <member><methodname>LuaSandbox::unpauseUsageTimer</methodname></member>
+ </simplelist>
</refsect1>
</refentry>
-
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
diff --git a/reference/luasandbox/luasandbox/registerlibrary.xml b/reference/luasandbox/luasandbox/registerlibrary.xml
index 0fa62a474389..aea52c6ce891 100644
--- a/reference/luasandbox/luasandbox/registerlibrary.xml
+++ b/reference/luasandbox/luasandbox/registerlibrary.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-
-<refentry xml:id="luasandbox.registerlibrary" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="luasandbox.registerlibrary">
<refnamediv>
<refname>LuaSandbox::registerLibrary</refname>
<refpurpose>Register a set of PHP functions as a Lua library</refpurpose>
@@ -59,10 +58,9 @@
<refsect1 role="examples">
&reftitle.examples;
- <para>
- <example>
- <title>Registering PHP functions to call from Lua</title>
- <programlisting role="php">
+ <example>
+ <title>Registering PHP functions to call from Lua</title>
+ <programlisting role="php">
<![CDATA[
<?php
@@ -87,23 +85,19 @@ $sandbox->registerLibrary( 'php', [
?>
]]>
- </programlisting>
- </example>
- </para>
+ </programlisting>
+ </example>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
- <para>
- <simplelist>
- <member><methodname>LuaSandbox::loadString</methodname></member>
- <member><methodname>LuaSandbox::wrapPhpFunction</methodname></member>
- </simplelist>
- </para>
+ <simplelist>
+ <member><methodname>LuaSandbox::loadString</methodname></member>
+ <member><methodname>LuaSandbox::wrapPhpFunction</methodname></member>
+ </simplelist>
</refsect1>
</refentry>
-
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
diff --git a/reference/luasandbox/luasandbox/setcpulimit.xml b/reference/luasandbox/luasandbox/setcpulimit.xml
index 1352e08dd90d..3e7cc7b79ff9 100644
--- a/reference/luasandbox/luasandbox/setcpulimit.xml
+++ b/reference/luasandbox/luasandbox/setcpulimit.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-
-<refentry xml:id="luasandbox.setcpulimit" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="luasandbox.setcpulimit">
<refnamediv>
<refname>LuaSandbox::setCPULimit</refname>
<refpurpose>Set the CPU time limit for the Lua environment</refpurpose>
@@ -60,10 +59,9 @@
<refsect1 role="examples">
&reftitle.examples;
- <para>
- <example>
- <title>Calling a Lua function</title>
- <programlisting role="php">
+ <example>
+ <title>Calling a Lua function</title>
+ <programlisting role="php">
<![CDATA[
<?php
@@ -78,29 +76,25 @@ $sandbox->loadString( 'while true do end' )->call();
?>
]]>
- </programlisting>
- &example.outputs.similar;
- <screen>
+ </programlisting>
+ &example.outputs.similar;
+ <screen>
<![CDATA[
PHP Fatal error: Uncaught LuaSandboxTimeoutError: The maximum execution time for this script was exceeded
]]>
- </screen>
- </example>
- </para>
+ </screen>
+ </example>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
- <para>
- <simplelist>
- <member><methodname>LuaSandbox::getCPUUsage</methodname></member>
- <member><methodname>LuaSandbox::setMemoryLimit</methodname></member>
- </simplelist>
- </para>
+ <simplelist>
+ <member><methodname>LuaSandbox::getCPUUsage</methodname></member>
+ <member><methodname>LuaSandbox::setMemoryLimit</methodname></member>
+ </simplelist>
</refsect1>
</refentry>
-
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
diff --git a/reference/luasandbox/luasandbox/setmemorylimit.xml b/reference/luasandbox/luasandbox/setmemorylimit.xml
index 83376ee6d3c0..8055109926eb 100644
--- a/reference/luasandbox/luasandbox/setmemorylimit.xml
+++ b/reference/luasandbox/luasandbox/setmemorylimit.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-
-<refentry xml:id="luasandbox.setmemorylimit" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="luasandbox.setmemorylimit">
<refnamediv>
<refname>LuaSandbox::setMemoryLimit</refname>
<refpurpose>Set the memory limit for the Lua environment</refpurpose>
@@ -46,10 +45,9 @@
<refsect1 role="examples">
&reftitle.examples;
- <para>
- <example>
- <title>Calling a Lua function</title>
- <programlisting role="php">
+ <example>
+ <title>Calling a Lua function</title>
+ <programlisting role="php">
<![CDATA[
<?php
@@ -64,30 +62,26 @@ $sandbox->loadString( 'local x = "x"; while true do x = x .. x; end' )->call();
?>
]]>
- </programlisting>
- &example.outputs.similar;
- <screen>
+ </programlisting>
+ &example.outputs.similar;
+ <screen>
<![CDATA[
PHP Fatal error: Uncaught LuaSandboxMemoryError: not enough memory
]]>
- </screen>
- </example>
- </para>
+ </screen>
+ </example>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
- <para>
- <simplelist>
- <member><methodname>LuaSandbox::getMemoryUsage</methodname></member>
- <member><methodname>LuaSandbox::getPeakMemoryUsage</methodname></member>
- <member><methodname>LuaSandbox::setCPULimit</methodname></member>
- </simplelist>
- </para>
+ <simplelist>
+ <member><methodname>LuaSandbox::getMemoryUsage</methodname></member>
+ <member><methodname>LuaSandbox::getPeakMemoryUsage</methodname></member>
+ <member><methodname>LuaSandbox::setCPULimit</methodname></member>
+ </simplelist>
</refsect1>
</refentry>
-
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
diff --git a/reference/luasandbox/luasandbox/unpauseusagetimer.xml b/reference/luasandbox/luasandbox/unpauseusagetimer.xml
index c765786620e1..0b949da06642 100644
--- a/reference/luasandbox/luasandbox/unpauseusagetimer.xml
+++ b/reference/luasandbox/luasandbox/unpauseusagetimer.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-
-<refentry xml:id="luasandbox.unpauseusagetimer" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="luasandbox.unpauseusagetimer">
<refnamediv>
<refname>LuaSandbox::unpauseUsageTimer</refname>
<refpurpose>Unpause the timer paused by <methodname>LuaSandbox::pauseUsageTimer</methodname></refpurpose>
@@ -11,7 +10,7 @@
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>void</type><methodname>LuaSandbox::unpauseUsageTimer</methodname>
- <void />
+ <void/>
</methodsynopsis>
<para>
Unpauses the timer paused by <methodname>LuaSandbox::pauseUsageTimer</methodname>.
@@ -33,16 +32,13 @@
<refsect1 role="seealso">
&reftitle.seealso;
- <para>
- <simplelist>
- <member><methodname>LuaSandbox::pauseUsageTimer</methodname></member>
- <member><methodname>LuaSandbox::setCPULimit</methodname></member>
- </simplelist>
- </para>
+ <simplelist>
+ <member><methodname>LuaSandbox::pauseUsageTimer</methodname></member>
+ <member><methodname>LuaSandbox::setCPULimit</methodname></member>
+ </simplelist>
</refsect1>
</refentry>
-
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
diff --git a/reference/luasandbox/luasandbox/wrapphpfunction.xml b/reference/luasandbox/luasandbox/wrapphpfunction.xml
index 594b7b91466f..f59127d06bb2 100644
--- a/reference/luasandbox/luasandbox/wrapphpfunction.xml
+++ b/reference/luasandbox/luasandbox/wrapphpfunction.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-
-<refentry xml:id="luasandbox.wrapphpfunction" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="luasandbox.wrapphpfunction">
<refnamediv>
<refname>LuaSandbox::wrapPhpFunction</refname>
<refpurpose>Wrap a PHP callable in a <classname>LuaSandboxFunction</classname></refpurpose>
@@ -55,16 +54,13 @@
<refsect1 role="seealso">
&reftitle.seealso;
- <para>
- <simplelist>
- <member><methodname>LuaSandbox::loadString</methodname></member>
- <member><methodname>LuaSandbox::registerLibrary</methodname></member>
- </simplelist>
- </para>
+ <simplelist>
+ <member><methodname>LuaSandbox::loadString</methodname></member>
+ <member><methodname>LuaSandbox::registerLibrary</methodname></member>
+ </simplelist>
</refsect1>
</refentry>
-
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
diff --git a/reference/luasandbox/luasandboxfunction/call.xml b/reference/luasandbox/luasandboxfunction/call.xml
index 01729f6cf303..370ce34666e1 100644
--- a/reference/luasandbox/luasandboxfunction/call.xml
+++ b/reference/luasandbox/luasandboxfunction/call.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-
-<refentry xml:id="luasandboxfunction.call" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="luasandboxfunction.call">
<refnamediv>
<refname>LuaSandboxFunction::call</refname>
<refpurpose>Call a Lua function</refpurpose>
@@ -26,87 +25,83 @@
<para>
PHP and Lua types are converted as follows:
</para>
- <para>
- <itemizedlist>
- <listitem>
- <para>PHP &null; is Lua <literal>nil</literal>, and vice versa.</para>
- </listitem>
- <listitem>
- <para>
- PHP <type>int</type>s and <type>float</type>s are converted to Lua
- numbers. Infinity and <constant>NAN</constant> are supported.
- </para>
- </listitem>
- <listitem>
- <para>
- Lua numbers without a fractional part between approximately <literal>-2**53</literal>
- and <literal>2**53</literal> are converted to PHP <type>int</type>s, with others
- being converted to PHP <type>float</type>s.
- </para>
- </listitem>
- <listitem>
- <para>PHP <type>bool</type>s are Lua booleans, and vice versa.</para>
- </listitem>
- <listitem>
- <para>PHP <type>string</type>s are Lua strings, and vice versa.</para>
- </listitem>
- <listitem>
- <para>
- Lua functions are PHP <classname>LuaSandboxFunction</classname> objects, and vice versa.
- General PHP <type>callable</type>s are not supported.
- </para>
- </listitem>
- <listitem>
- <para>
- PHP <type>array</type>s are converted to Lua tables, and vice versa.
- </para>
- <para>
- <itemizedlist>
- <listitem>
- <para>
- Note that Lua typically indexes arrays from 1, while PHP indexes
- arrays from 0. No adjustment is made for these differing
- conventions.
- </para>
- </listitem>
- <listitem>
- <para>Self-referential arrays are not supported in either direction.</para>
- </listitem>
- <listitem>
- <para>PHP references are dereferenced.</para>
- </listitem>
- <listitem>
- <para>
- Lua <literal>__pairs</literal> and <literal>__ipairs</literal> are processed.
- <literal>__index</literal> is ignored.
- </para>
- </listitem>
- <listitem>
- <para>
- When converting from PHP to Lua, integer keys between
- <literal>-2**53</literal> and <literal>2**53</literal> are represented
- as Lua numbers. All other keys are represented as Lua strings.
- </para>
- </listitem>
- <listitem>
- <para>
- When converting from Lua to PHP, keys other than strings and
- numbers will result in an error, as will collisions when converting
- numbers to strings or vice versa (since PHP considers things like
- <literal>$a[0]</literal> and <literal>$a["0"]</literal> as being equivalent).
- </para>
- </listitem>
- </itemizedlist>
- </para>
- </listitem>
- <listitem>
- <para>
- All other types are unsupported and will raise an error/exception,
- including general PHP <type>object</type>s and Lua userdata and thread types.
- </para>
- </listitem>
- </itemizedlist>
- </para>
+ <itemizedlist>
+ <listitem>
+ <para>PHP &null; is Lua <literal>nil</literal>, and vice versa.</para>
+ </listitem>
+ <listitem>
+ <para>
+ PHP <type>int</type>s and <type>float</type>s are converted to Lua
+ numbers. Infinity and <constant>NAN</constant> are supported.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Lua numbers without a fractional part between approximately <literal>-2**53</literal>
+ and <literal>2**53</literal> are converted to PHP <type>int</type>s, with others
+ being converted to PHP <type>float</type>s.
+ </para>
+ </listitem>
+ <listitem>
+ <para>PHP <type>bool</type>s are Lua booleans, and vice versa.</para>
+ </listitem>
+ <listitem>
+ <para>PHP <type>string</type>s are Lua strings, and vice versa.</para>
+ </listitem>
+ <listitem>
+ <para>
+ Lua functions are PHP <classname>LuaSandboxFunction</classname> objects, and vice versa.
+ General PHP <type>callable</type>s are not supported.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ PHP <type>array</type>s are converted to Lua tables, and vice versa.
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Note that Lua typically indexes arrays from 1, while PHP indexes
+ arrays from 0. No adjustment is made for these differing
+ conventions.
+ </para>
+ </listitem>
+ <listitem>
+ <para>Self-referential arrays are not supported in either direction.</para>
+ </listitem>
+ <listitem>
+ <para>PHP references are dereferenced.</para>
+ </listitem>
+ <listitem>
+ <para>
+ Lua <literal>__pairs</literal> and <literal>__ipairs</literal> are processed.
+ <literal>__index</literal> is ignored.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ When converting from PHP to Lua, integer keys between
+ <literal>-2**53</literal> and <literal>2**53</literal> are represented
+ as Lua numbers. All other keys are represented as Lua strings.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ When converting from Lua to PHP, keys other than strings and
+ numbers will result in an error, as will collisions when converting
+ numbers to strings or vice versa (since PHP considers things like
+ <literal>$a[0]</literal> and <literal>$a["0"]</literal> as being equivalent).
+ </para>
+ </listitem>
+ </itemizedlist>
+ </listitem>
+ <listitem>
+ <para>
+ All other types are unsupported and will raise an error/exception,
+ including general PHP <type>object</type>s and Lua userdata and thread types.
+ </para>
+ </listitem>
+ </itemizedlist>
<para>
Lua functions inherently return a list of results. So on success, this
method returns an <type>array</type> containing all of the values returned by Lua,
@@ -138,7 +133,6 @@
</refsect1>
</refentry>
-
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
diff --git a/reference/luasandbox/luasandboxmemoryerror.xml b/reference/luasandbox/luasandboxmemoryerror.xml
index 9c2d40667ffd..3f798f5d2e3a 100644
--- a/reference/luasandbox/luasandboxmemoryerror.xml
+++ b/reference/luasandbox/luasandboxmemoryerror.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-
-<reference xml:id="class.luasandboxmemoryerror" role="class" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude">
+<reference xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude" xml:id="class.luasandboxmemoryerror" role="class">
<title>The LuaSandboxMemoryError class</title>
<titleabbrev>LuaSandboxMemoryError</titleabbrev>
@@ -38,7 +37,7 @@
<!-- }}} -->
<classsynopsisinfo role="comment">&InheritedProperties;</classsynopsisinfo>
- <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('exception.synopsis')/descendant::db:fieldsynopsis)" />
+ <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('exception.synopsis')/descendant::db:fieldsynopsis)"/>
<!--
@@ -47,7 +46,7 @@
-->
<classsynopsisinfo role="comment">&InheritedMethods;</classsynopsisinfo>
- <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.exception')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[not(@role='procedural')])" />
+ <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.exception')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[not(@role='procedural')])"/>
</classsynopsis>
<!-- }}} -->
@@ -56,11 +55,9 @@
<section xml:id="luasandboxmemoryerror.seealso">
&reftitle.seealso;
- <para>
- <simplelist>
- <member><methodname>LuaSandbox::setMemoryLimit</methodname></member>
- </simplelist>
- </para>
+ <simplelist>
+ <member><methodname>LuaSandbox::setMemoryLimit</methodname></member>
+ </simplelist>
</section>
</partintro>
@@ -68,7 +65,6 @@
<!-- &reference.luasandbox.entities.luasandboxmemoryerror; -->
</reference>
-
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
diff --git a/reference/luasandbox/luasandboxtimeouterror.xml b/reference/luasandbox/luasandboxtimeouterror.xml
index 68031b95b10d..205a16a5e751 100644
--- a/reference/luasandbox/luasandboxtimeouterror.xml
+++ b/reference/luasandbox/luasandboxtimeouterror.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-
-<reference xml:id="class.luasandboxtimeouterror" role="class" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude">
+<reference xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude" xml:id="class.luasandboxtimeouterror" role="class">
<title>The LuaSandboxTimeoutError class</title>
<titleabbrev>LuaSandboxTimeoutError</titleabbrev>
@@ -38,7 +37,7 @@
<!-- }}} -->
<classsynopsisinfo role="comment">&InheritedProperties;</classsynopsisinfo>
- <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('exception.synopsis')/descendant::db:fieldsynopsis)" />
+ <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('exception.synopsis')/descendant::db:fieldsynopsis)"/>
<!--
@@ -47,7 +46,7 @@
-->
<classsynopsisinfo role="comment">&InheritedMethods;</classsynopsisinfo>
- <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.exception')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[not(@role='procedural')])" />
+ <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.exception')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[not(@role='procedural')])"/>
</classsynopsis>
<!-- }}} -->
@@ -56,11 +55,9 @@
<section xml:id="luasandboxtimeouterror.seealso">
&reftitle.seealso;
- <para>
- <simplelist>
- <member><methodname>LuaSandbox::setCPULimit</methodname></member>
- </simplelist>
- </para>
+ <simplelist>
+ <member><methodname>LuaSandbox::setCPULimit</methodname></member>
+ </simplelist>
</section>
</partintro>
@@ -68,7 +65,6 @@
<!-- &reference.luasandbox.entities.luasandboxtimeouterror; -->
</reference>
-
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml