mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Added changes to make manual "more PHP 5 friendly", like changing "In PHP 4" to "As of PHP 4"
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@164053 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
148550502b
commit
3fcea89834
12 changed files with 37 additions and 48 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.95 $ -->
|
||||
<!-- $Revision: 1.96 $ -->
|
||||
<chapter id="language.control-structures">
|
||||
<title>Control Structures</title>
|
||||
|
||||
|
@ -476,23 +476,12 @@ for (expr1; expr2; expr3): statement; ...; endfor;
|
|||
</programlisting>
|
||||
</informalexample>
|
||||
</para>
|
||||
<para>
|
||||
Other languages have a <literal>foreach</literal> statement to
|
||||
traverse an array or hash. PHP 3 has no such construct; PHP 4 does
|
||||
(see <link
|
||||
linkend="control-structures.foreach">foreach</link>). In PHP 3, you
|
||||
can combine <link linkend="control-structures.while">while</link>
|
||||
with the <function>list</function> and <function>each</function>
|
||||
functions to achieve the same effect. See the documentation for
|
||||
these functions for an example.
|
||||
</para>
|
||||
|
||||
</sect1>
|
||||
|
||||
<sect1 id="control-structures.foreach">
|
||||
<title><literal>foreach</literal></title>
|
||||
<para>
|
||||
PHP 4 (not PHP 3) includes a <literal>foreach</literal> construct, much
|
||||
PHP 4 introduced a <literal>foreach</literal> construct, much
|
||||
like Perl and some other languages. This simply gives an easy way to
|
||||
iterate over arrays. <literal>foreach</literal> works only on arrays, and
|
||||
will issue an error when you try to use it on a variable with a different
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.49 $ -->
|
||||
<!-- $Revision: 1.50 $ -->
|
||||
<chapter id="language.functions">
|
||||
<title>Functions</title>
|
||||
|
||||
|
@ -41,7 +41,7 @@ function foo($arg_1, $arg_2, /* ..., */ $arg_n)
|
|||
</simpara>
|
||||
<simpara>
|
||||
In PHP 3, functions must be defined before they are referenced. No
|
||||
such requirement exists in PHP 4. <emphasis>Except</emphasis> when
|
||||
such requirement exists since PHP 4. <emphasis>Except</emphasis> when
|
||||
a function is conditionally defined such as shown in the two examples
|
||||
below.
|
||||
</simpara>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.78 $ -->
|
||||
<!-- $Revision: 1.79 $ -->
|
||||
<chapter id="language.variables">
|
||||
<title>Variables</title>
|
||||
|
||||
|
@ -55,7 +55,7 @@ $t
|
|||
linkend="language.expressions">Expressions</link>.
|
||||
</para>
|
||||
<para>
|
||||
PHP 4 offers another way to assign values to variables:
|
||||
As of PHP 4, PHP offers another way to assign values to variables:
|
||||
<link linkend="language.references">assign by reference</link>.
|
||||
This means that the new variable simply references (in other words,
|
||||
"becomes an alias for" or "points to") the original variable.
|
||||
|
@ -942,7 +942,7 @@ if (isset($_POST['action']) && $_POST['action'] == 'submitted') {
|
|||
|
||||
<para>
|
||||
In PHP 3, the array form variable usage is limited to
|
||||
single-dimensional arrays. In PHP 4, no such restriction applies.
|
||||
single-dimensional arrays. As of PHP 4, no such restriction applies.
|
||||
</para>
|
||||
|
||||
<sect3 id="language.variables.external.form.submit">
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.23 $ -->
|
||||
<!-- $Revision: 1.24 $ -->
|
||||
<!-- splitted from ./en/functions/http.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.header">
|
||||
<refnamediv>
|
||||
|
@ -201,7 +201,7 @@ header('Location: http://www.example.com/');
|
|||
</para>
|
||||
<note>
|
||||
<para>
|
||||
In PHP 4, you can use output buffering to get around this problem,
|
||||
As of PHP 4, you can use output buffering to get around this problem,
|
||||
with the overhead of all of your output to the browser being buffered
|
||||
in the server until you send it. You can do this by calling
|
||||
<function>ob_start</function> and <function>ob_end_flush</function>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.28 $ -->
|
||||
<!-- $Revision: 1.29 $ -->
|
||||
<!-- splitted from ./en/functions/http.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.setcookie">
|
||||
<refnamediv>
|
||||
|
@ -31,12 +31,13 @@
|
|||
</para>
|
||||
<note>
|
||||
<para>
|
||||
In PHP 4, you can use output buffering to send output prior to the call
|
||||
of this function, with the overhead of all of your output to the browser
|
||||
being buffered in the server until you send it. You can do this by calling
|
||||
<function>ob_start</function> and <function>ob_end_flush</function>
|
||||
in your script, or setting the <literal>output_buffering</literal>
|
||||
configuration directive on in your &php.ini; or server configuration files.
|
||||
As of PHP 4, you can use output buffering to send output prior to the
|
||||
call of this function, with the overhead of all of your output to the
|
||||
browser being buffered in the server until you send it. You can do this
|
||||
by calling <function>ob_start</function> and
|
||||
<function>ob_end_flush</function> in your script, or setting the
|
||||
<literal>output_buffering</literal> configuration directive on in your
|
||||
&php.ini; or server configuration files.
|
||||
</para>
|
||||
</note>
|
||||
<para>
|
||||
|
@ -201,7 +202,7 @@
|
|||
In PHP 3, multiple calls to <function>setcookie</function> in the same
|
||||
script will be performed in reverse order. If you are trying to
|
||||
delete one cookie before inserting another you should put the
|
||||
insert before the delete. In PHP 4, multiple calls to
|
||||
insert before the delete. As of PHP 4, multiple calls to
|
||||
<function>setcookie</function> are performed in the order called.
|
||||
</simpara>
|
||||
<para>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.8 $ -->
|
||||
<!-- $Revision: 1.9 $ -->
|
||||
<!-- splitted from ./en/functions/math.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.round">
|
||||
<refnamediv>
|
||||
|
@ -66,8 +66,8 @@ echo round(5.055, 2); // 5.06
|
|||
<para>
|
||||
<note>
|
||||
<simpara>
|
||||
The <parameter>precision</parameter> parameter is only
|
||||
available in PHP 4.
|
||||
The <parameter>precision</parameter> parameter was introduced
|
||||
in PHP 4.
|
||||
</simpara>
|
||||
</note>
|
||||
</para>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.7 $ -->
|
||||
<!-- $Revision: 1.8 $ -->
|
||||
<!-- splitted from ./en/functions/misc.xml, last change in rev 1.58 -->
|
||||
<refentry id="function.eval">
|
||||
<refnamediv>
|
||||
|
@ -33,7 +33,7 @@
|
|||
</simpara>
|
||||
<simpara>
|
||||
A <literal>return</literal> statement will terminate the evaluation of
|
||||
the string immediately. In PHP 4, <function>eval</function> returns
|
||||
the string immediately. As of PHP 4, <function>eval</function> returns
|
||||
&null; unless <literal>return</literal> is called in the evaluated
|
||||
code, in which case the value passed to <literal>return</literal> is
|
||||
returned. In PHP 3, <function>eval</function> does not return a value.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<!-- $Revision: 1.6 $ -->
|
||||
<!-- splitted from ./en/functions/misc.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.uniqid">
|
||||
<refnamediv>
|
||||
|
@ -34,8 +34,7 @@
|
|||
</simpara>
|
||||
<note>
|
||||
<simpara>
|
||||
The <parameter>lcg</parameter> parameter is only available in
|
||||
PHP 4 and PHP 3.0.13 and later.
|
||||
The <parameter>lcg</parameter> parameter was introduced in PHP 3.0.13.
|
||||
</simpara>
|
||||
</note>
|
||||
<para>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- splitted from ./en/functions/mysql.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.mysql-change-user">
|
||||
<refnamediv>
|
||||
|
@ -33,8 +33,8 @@
|
|||
|
||||
<note>
|
||||
<para>
|
||||
This function was introduced in PHP 3.0.13 and requires MySQL
|
||||
3.23.3 or higher. It is not available in PHP 4.
|
||||
This deprecated function is only available in PHP 3 and requires MySQL
|
||||
3.23.3 or higher.
|
||||
</para>
|
||||
</note>
|
||||
</refsect1>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.8 $ -->
|
||||
<!-- $Revision: 1.9 $ -->
|
||||
<!-- splitted from ./en/functions/var.xml, last change in rev 1.28 -->
|
||||
<refentry id="function.serialize">
|
||||
<refnamediv>
|
||||
|
@ -53,8 +53,8 @@
|
|||
<note>
|
||||
<para>
|
||||
In PHP 3, object properties will be serialized, but methods are
|
||||
lost. PHP 4 removes that limitation and restores both properties
|
||||
and methods. Please see the <link
|
||||
lost. That limitation was removed in PHP 4 as both properties
|
||||
and methods are now restored. Please see the <link
|
||||
linkend="language.oop.serialization">Serializing Objects</link>
|
||||
section of <link linkend="language.oop">Classes and
|
||||
Objects</link> for more information.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.15 $ -->
|
||||
<!-- $Revision: 1.16 $ -->
|
||||
<!-- splitted from ./en/functions/var.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.unserialize">
|
||||
<refnamediv>
|
||||
|
@ -63,8 +63,8 @@ function mycallback($classname)
|
|||
<note>
|
||||
<para>
|
||||
In PHP 3, methods are not preserved when unserializing a
|
||||
serialized object. PHP 4 removes that limitation and restores
|
||||
both properties and methods. Please see the <link
|
||||
serialized object. That limitation was removed in PHP 4 as both
|
||||
properties and methods are now restored. Please see the <link
|
||||
linkend="language.oop.serialization">Serializing Objects</link>
|
||||
section of <link linkend="language.oop">Classes and
|
||||
Objects</link> or more information.
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<section id="vpopmail.installation">
|
||||
&reftitle.install;
|
||||
<para id="vpopmail.configure">
|
||||
In PHP 4, these functions are only available if <literal>PHP</literal> was
|
||||
configured with <option role="configure">--with-vpopmail[=DIR]</option>.
|
||||
As of PHP 4, these functions are only available if <literal>PHP</literal>
|
||||
was configured with <option role="configure">--with-vpopmail[=DIR]</option>.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
|
|
Loading…
Reference in a new issue