philip Fri Jun 6 01:33:09 2003 EDT
Modified files:
/phpdoc/en language-snippets.ent
/phpdoc/en/chapters config.xml tutorial.xml
/phpdoc/en/language variables.xml
/phpdoc/en/appendices reserved.xml
Log:
Implement register_long_arrays information, available as of PHP 5.0.0
Index: phpdoc/en/language-snippets.ent
diff -u phpdoc/en/language-snippets.ent:1.52 phpdoc/en/language-snippets.ent:1.53
--- phpdoc/en/language-snippets.ent:1.52 Fri May 30 15:38:25 2003
+++ phpdoc/en/language-snippets.ent Fri Jun 6 01:33:08 2003
@@ -1,4 +1,4 @@
-<!-- $Revision: 1.52 $ -->
+<!-- $Revision: 1.53 $ -->
<!ENTITY warn.experimental '<warning><simpara>This extension is
<emphasis>EXPERIMENTAL</emphasis>. The behaviour of this extension --
@@ -76,6 +76,12 @@
</varname>, <varname>$_POST</varname>, and <varname>$_SERVER</varname>,
etc. have been available. For more information, read the manual section
on &link.superglobals;</para></note>'>
+
+<!ENTITY avail.register-long-arrays 'As of PHP 5.0.0, the long PHP
+<link linkend="language.variables.predefined">predefined variable</link>
+arrays may be disabled with the
+<link linkend="ini.register-long-arrays">register_long_arrays</link>
+directive.'>
<!ENTITY note.magicquotes.gpc '<note><title>directive note: magic_quotes_gpc
</title><para>The PHP directive <link linkend="ini.magic-quotes-gpc">
Index: phpdoc/en/chapters/config.xml
diff -u phpdoc/en/chapters/config.xml:1.105 phpdoc/en/chapters/config.xml:1.106
--- phpdoc/en/chapters/config.xml:1.105 Thu Jun 5 13:39:38 2003
+++ phpdoc/en/chapters/config.xml Fri Jun 6 01:33:09 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.105 $ -->
+<!-- $Revision: 1.106 $ -->
<chapter id="configuration">
<title>Configuration</title>
@@ -569,6 +569,11 @@
<entry>PHP_INI_PERDIR|PHP_INI_SYSTEM</entry>
</row>
<row>
+ <entry>register_long_arrays</entry>
+ <entry>"On"</entry>
+ <entry>PHP_INI_PERDIR|PHP_INI_SYSTEM</entry>
+ </row>
+ <row>
<entry>post_max_size</entry>
<entry>"8M"</entry>
<entry>PHP_INI_SYSTEM|PHP_INI_PERDIR</entry>
@@ -744,6 +749,28 @@
See also <link linkend="features.commandline">command line</link>.
Also, this directive became available in PHP 4.0.0 and
was always "on" before that.
+ </simpara>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry id="ini.register-long-arrays">
+ <term>
+ <parameter>register_long_arrays</parameter>
+ <type>boolean</type>
+ </term>
+ <listitem>
+ <simpara>
+ Tells PHP whether or not to register the deprecated long
+ <varname>$HTTP_*_VARS</varname> type
+ <link linkend="language.variables.predefined">predefined
+ variables</link>. When On (default), long predefined PHP
+ variables like <varname>$HTTP_GET_VARS</varname> will be defined.
+ If you're not using them, it's recommended to turn them off,
+ for performance reasons. Instead, use the superglobal arrays,
+ like <varname>$_GET</varname>.
+ </simpara>
+ <simpara>
+ This directive became available in PHP 5.0.0.
</simpara>
</listitem>
</varlistentry>
Index: phpdoc/en/chapters/tutorial.xml
diff -u phpdoc/en/chapters/tutorial.xml:1.20 phpdoc/en/chapters/tutorial.xml:1.21
--- phpdoc/en/chapters/tutorial.xml:1.20 Fri Jun 6 00:04:20 2003
+++ phpdoc/en/chapters/tutorial.xml Fri Jun 6 01:33:09 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.20 $ -->
+<!-- $Revision: 1.21 $ -->
<chapter id="tutorial">
<title>A simple tutorial</title>
@@ -452,6 +452,8 @@
<varname>$_REQUEST</varname>, and <varname>$_SESSION</varname>. The
older <varname>$HTTP_*_VARS</varname> arrays, such as
<varname>$HTTP_POST_VARS</varname>, still exist and have since PHP 3.
+
+ &avail.register-long-arrays;
</simpara>
</listitem>
<listitem>
Index: phpdoc/en/language/variables.xml
diff -u phpdoc/en/language/variables.xml:1.58 phpdoc/en/language/variables.xml:1.59
--- phpdoc/en/language/variables.xml:1.58 Mon Apr 21 22:19:50 2003
+++ phpdoc/en/language/variables.xml Fri Jun 6 01:33:09 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.58 $ -->
+<!-- $Revision: 1.59 $ -->
<chapter id="language.variables">
<title>Variables</title>
@@ -167,6 +167,8 @@
<link linkend="reserved.variables">Reserved Predefined Variables</link>.
Also, you'll notice how the older predefined variables
(<varname>$HTTP_*_VARS</varname>) still exist.
+
+ &avail.register-long-arrays;
</simpara>
<note>
@@ -780,7 +782,8 @@
import_request_variables('p', 'p_');
print $p_username;
-// Available since PHP 3.
+// Available since PHP 3. As of PHP 5.0.0, these long predefined
+// variables can be disabled with the register_long_arrays directive.
print $HTTP_POST_VARS['username'];
Index: phpdoc/en/appendices/reserved.xml
diff -u phpdoc/en/appendices/reserved.xml:1.32 phpdoc/en/appendices/reserved.xml:1.33
--- phpdoc/en/appendices/reserved.xml:1.32 Sun Jun 1 12:56:56 2003
+++ phpdoc/en/appendices/reserved.xml Fri Jun 6 01:33:09 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.32 $ -->
+<!-- $Revision: 1.33 $ -->
<appendix id="reserved">
<title>List of Reserved Words</title>
@@ -216,6 +216,16 @@
<sect1 id="reserved.variables">
<title>Predefined Variables</title>
+
+ <para>
+ Since PHP 4.1.0, the preferred method for retrieving
+ <link linkend="language.variables.external">external variables</link> is
+ with the superglobals mentioned below. Before this time, people relied
+ on either <link linkend="ini.register-globals">register_globals</link>
+ or the long predefined PHP arrays (<varname>$HTTP_*_VARS</varname>).
+
+ &avail.register-long-arrays;
+ </para>
<sect2 id="reserved.variables.server">
<title>Server variables: <varname>$_SERVER</varname></title>
--
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php