mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00
add missing cdata section, use more entities & some wz
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@178032 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
1180c08a23
commit
11f2d48e60
12 changed files with 127 additions and 103 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.36 $ -->
|
||||
<!-- $Revision: 1.37 $ -->
|
||||
|
||||
<appendix id="about">
|
||||
<title>About the manual</title>
|
||||
|
@ -140,7 +140,8 @@
|
|||
Let's use the definition for <function>strlen</function> as our first example:
|
||||
</para>
|
||||
<para>
|
||||
<screen>
|
||||
<screen role="html">
|
||||
<![CDATA[
|
||||
strlen
|
||||
|
||||
(PHP 3, PHP 4, PHP 5)
|
||||
|
@ -150,6 +151,7 @@ Description
|
|||
int strlen ( string str )
|
||||
|
||||
Returns the length of string.
|
||||
]]>
|
||||
</screen>
|
||||
</para>
|
||||
<para>
|
||||
|
@ -208,7 +210,9 @@ Returns the length of string.
|
|||
</para>
|
||||
<para>
|
||||
<screen>
|
||||
<![CDATA[
|
||||
returned type function name ( parameter type parameter name )
|
||||
]]>
|
||||
</screen>
|
||||
</para>
|
||||
<para>
|
||||
|
@ -217,7 +221,9 @@ Returns the length of string.
|
|||
</para>
|
||||
<para>
|
||||
<screen>
|
||||
<![CDATA[
|
||||
bool in_array ( mixed needle, array haystack [, bool strict])
|
||||
]]>
|
||||
</screen>
|
||||
</para>
|
||||
<para>
|
||||
|
@ -247,7 +253,9 @@ Returns the length of string.
|
|||
</para>
|
||||
<para>
|
||||
<screen>
|
||||
(PHP 4 >= 4.3.0, PHP 5)
|
||||
<![CDATA[
|
||||
(PHP 4 >= 4.3.0, PHP 5)
|
||||
]]>
|
||||
</screen>
|
||||
</para>
|
||||
<para>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.82 $ -->
|
||||
<!-- $Revision: 1.83 $ -->
|
||||
<chapter id="features.file-upload">
|
||||
<title>Handling file uploads</title>
|
||||
|
||||
|
@ -456,8 +456,10 @@ fclose($putdata);
|
|||
PUT requests are much simpler
|
||||
than a file upload and they look something like this:
|
||||
<informalexample>
|
||||
<programlisting>
|
||||
<programlisting role="HTTP">
|
||||
<![CDATA[
|
||||
PUT /path/filename.html HTTP/1.1
|
||||
]]>
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
</para>
|
||||
|
@ -474,7 +476,9 @@ PUT /path/filename.html HTTP/1.1
|
|||
a <Virtualhost> block. A line like this would do the trick:
|
||||
<informalexample>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
Script PUT /put.php
|
||||
]]>
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
</para>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.56 $ -->
|
||||
<!-- $Revision: 1.57 $ -->
|
||||
<chapter id="language.oop">
|
||||
<title>Classes and Objects (PHP 4)</title>
|
||||
|
||||
|
@ -972,9 +972,7 @@ $a->c->echoValue();
|
|||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
This example will output:
|
||||
</para>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
class A: 10
|
||||
|
@ -1055,9 +1053,9 @@ compareObjects($o, $r);
|
|||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
We will see:
|
||||
<screen>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
Compare instances created with the same parameters
|
||||
o1 == o2 : TRUE
|
||||
o1 != o2 : FALSE
|
||||
|
@ -1075,7 +1073,9 @@ o1 == o2 : FALSE
|
|||
o1 != o2 : TRUE
|
||||
o1 === o2 : FALSE
|
||||
o1 !== o2 : TRUE
|
||||
</screen>
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
Which is the output we will expect to obtain given the comparison rules
|
||||
above. Only instances with the same values for their attributes and from the same
|
||||
class are considered equal and identical.
|
||||
|
@ -1122,9 +1122,9 @@ compareObjects($u, $w);
|
|||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
Which gives the expected output:
|
||||
<screen>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
Composite objects u(o,p) and v(q,p)
|
||||
o1 == o2 : TRUE
|
||||
o1 != o2 : FALSE
|
||||
|
@ -1136,7 +1136,9 @@ o1 == o2 : FALSE
|
|||
o1 != o2 : TRUE
|
||||
o1 === o2 : FALSE
|
||||
o1 !== o2 : TRUE
|
||||
</screen>
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</sect1>
|
||||
</chapter>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<sect1 id="language.oop5.object-comparison">
|
||||
<title>Comparing objects</title>
|
||||
<para>
|
||||
|
@ -76,9 +76,9 @@ compareObjects($o, $r);
|
|||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
This example will output:
|
||||
<screen>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
Two instances of the same class
|
||||
o1 == o2 : TRUE
|
||||
o1 != o2 : FALSE
|
||||
|
@ -96,7 +96,9 @@ o1 == o2 : FALSE
|
|||
o1 != o2 : TRUE
|
||||
o1 === o2 : FALSE
|
||||
o1 !== o2 : TRUE
|
||||
</screen>
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</sect1>
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.83 $ -->
|
||||
<!-- $Revision: 1.84 $ -->
|
||||
<chapter id="language.operators">
|
||||
<title>Operators</title>
|
||||
<simpara>
|
||||
|
@ -775,21 +775,19 @@ echo "Should be 4: " . $a . "<br />\n";
|
|||
$i = 'W';
|
||||
for($n=0; $n<6; $n++)
|
||||
echo ++$i . "\n";
|
||||
|
||||
/*
|
||||
Produces the output similar to the following:
|
||||
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
X
|
||||
Y
|
||||
Z
|
||||
AA
|
||||
AB
|
||||
AC
|
||||
|
||||
*/
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.147 $ -->
|
||||
<!-- $Revision: 1.148 $ -->
|
||||
<chapter id="language.types">
|
||||
<title>Types</title>
|
||||
|
||||
|
@ -559,10 +559,12 @@ $c = 7E-10;
|
|||
</informalexample>
|
||||
Formally:
|
||||
<informalexample>
|
||||
<programlisting>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
LNUM [0-9]+
|
||||
DNUM ([0-9]*[\.]{LNUM}) | ({LNUM}[\.][0-9]*)
|
||||
EXPONENT_DNUM ( ({LNUM} | {DNUM}) [eE][+-]? {LNUM})
|
||||
]]>
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
The size of a float is platform-dependent,
|
||||
|
@ -1475,9 +1477,8 @@ print_r($array);
|
|||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
The above example would produce the following output:
|
||||
<screen>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
Array
|
||||
(
|
||||
|
@ -1500,8 +1501,7 @@ Array
|
|||
[1] => 7
|
||||
)
|
||||
]]>
|
||||
</screen>
|
||||
</para>
|
||||
</screen>
|
||||
</informalexample>
|
||||
|
||||
</note>
|
||||
|
@ -1609,9 +1609,8 @@ for ($i = 0; $i < $count; $i++) {
|
|||
]]>
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
<para>
|
||||
The output from the above is:
|
||||
<screen>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
Checking 0:
|
||||
Notice: Undefined index: $i in /path/to/script.html on line 9
|
||||
|
@ -1629,8 +1628,7 @@ Notice: Undefined index: $i in /path/to/script.html on line 11
|
|||
Bad:
|
||||
Good: 2
|
||||
]]>
|
||||
</screen>
|
||||
</para>
|
||||
</screen>
|
||||
</note>
|
||||
<para>
|
||||
More examples to demonstrate this fact:
|
||||
|
@ -1895,9 +1893,7 @@ foreach ($colors as $color) {
|
|||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
This will output:
|
||||
</para>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
Do you like red?
|
||||
|
@ -1934,9 +1930,7 @@ print_r($colors);
|
|||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
This will output:
|
||||
</para>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
Array
|
||||
|
@ -1962,9 +1956,7 @@ print_r($firstquarter);
|
|||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
This will output:
|
||||
</para>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
Array
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version='1.0' encoding='iso-8859-1'?>
|
||||
<!-- $Revision: 1.9 $ -->
|
||||
<!-- $Revision: 1.10 $ -->
|
||||
<refentry id="function.iconv-mime-decode-headers">
|
||||
<refnamediv>
|
||||
<refname>iconv_mime_decode_headers</refname>
|
||||
|
@ -82,14 +82,15 @@
|
|||
<example>
|
||||
<title><function>iconv_mime_decode_headers</function> example</title>
|
||||
<programlisting role="php">
|
||||
<?php
|
||||
$headers_string = <<<EOF
|
||||
<![CDATA[
|
||||
<?php
|
||||
$headers_string = <<<EOF
|
||||
Subject: =?UTF-8?B?UHLDvGZ1bmcgUHLDvGZ1bmc=?=
|
||||
To: example@example.com
|
||||
Date: Thu, 1 Jan 1970 00:00:00 +0000
|
||||
Message-Id: <example@example.com>
|
||||
Message-Id: <example@example.com>
|
||||
Received: from localhost (localhost [127.0.0.1]) by localhost
|
||||
with SMTP id example for <example@example.com>
|
||||
with SMTP id example for <example@example.com>
|
||||
Thu, 1 Jan 1970 00:00:00 +0000 (UTC)
|
||||
(envelope-from example-return-0000-example=example.com@example.com)
|
||||
Received: (qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000
|
||||
|
@ -98,25 +99,26 @@ EOF;
|
|||
|
||||
$headers = iconv_mime_decode_headers($headers_string, 0, "ISO-8859-1");
|
||||
print_r($headers);
|
||||
?>
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
<simpara>
|
||||
The output of this script should look like:
|
||||
</simpara>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
Array
|
||||
(
|
||||
[Subject] => Prüfung Prüfung
|
||||
[To] => example@example.com
|
||||
[Date] => Thu, 1 Jan 1970 00:00:00 +0000
|
||||
[Message-Id] => <example@example.com>
|
||||
[Received] => Array
|
||||
[Subject] => Prüfung Prüfung
|
||||
[To] => example@example.com
|
||||
[Date] => Thu, 1 Jan 1970 00:00:00 +0000
|
||||
[Message-Id] => <example@example.com>
|
||||
[Received] => Array
|
||||
(
|
||||
[0] => from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for <example@example.com>; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)
|
||||
[1] => (qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000
|
||||
[0] => from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for <example@example.com>; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)
|
||||
[1] => (qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000
|
||||
)
|
||||
|
||||
)
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version='1.0' encoding='iso-8859-1'?>
|
||||
<!-- $Revision: 1.6 $ -->
|
||||
<!-- $Revision: 1.7 $ -->
|
||||
<!-- Generated by xml_proto.php v2.0. Found in /scripts directory of phpdoc. -->
|
||||
<refentry id="function.iconv-mime-decode">
|
||||
<refnamediv>
|
||||
|
@ -72,11 +72,13 @@
|
|||
<example>
|
||||
<title><function>iconv_mime_decode</function> example</title>
|
||||
<programlisting role="php">
|
||||
<?php
|
||||
// This yields "Subject: Prüfung Prüfung"
|
||||
<![CDATA[
|
||||
<?php
|
||||
// This yields "Subject: Prüfung Prüfung"
|
||||
echo iconv_mime_decode("Subject: =?UTF-8?B?UHLDvGZ1bmcgUHLDvGZ1bmc=?=",
|
||||
0, "ISO-8859-1");
|
||||
?>
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
<para>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version='1.0' encoding='iso-8859-1'?>
|
||||
<!-- $Revision: 1.8 $ -->
|
||||
<!-- $Revision: 1.9 $ -->
|
||||
<!-- Generated by xml_proto.php v2.0. Found in /scripts directory of phpdoc. -->
|
||||
<refentry id="function.iconv-mime-encode">
|
||||
<refnamediv>
|
||||
|
@ -124,7 +124,8 @@ Subject: =?ISO-8859-1?Q?Pr=FCfung_f=FCr?= Entwerfen von einer MIME kopfzeile
|
|||
<example>
|
||||
<title><function>iconv_mime_encode</function> example:</title>
|
||||
<programlisting role="php">
|
||||
<?php
|
||||
<![CDATA[
|
||||
<?php
|
||||
$preferences = array(
|
||||
"input-charset" => "ISO-8859-1",
|
||||
"output-charset" => "UTF-8",
|
||||
|
@ -133,12 +134,13 @@ $preferences = array(
|
|||
);
|
||||
$preferences["scheme"] = "Q";
|
||||
// This yields "Subject: =?UTF-8?Q?Pr=C3=BCfung_Pr=C3=BCfung?="
|
||||
echo iconv_mime_encode("Subject", "Prüfung Prüfung", $preferences);
|
||||
echo iconv_mime_encode("Subject", "Prüfung Prüfung", $preferences);
|
||||
|
||||
$preferences["scheme"] = "B";
|
||||
// This yields "Subject: =?UTF-8?B?UHLDvGZ1bmcgUHLDvGZ1bmc=?="
|
||||
echo iconv_mime_encode("Subject", "Prüfung Prüfung", $preferences);
|
||||
?>
|
||||
echo iconv_mime_encode("Subject", "Prüfung Prüfung", $preferences);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<!-- $Revision: 1.6 $ -->
|
||||
<!-- splitted from ./en/functions/ldap.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.ldap-add">
|
||||
<refnamediv>
|
||||
|
@ -25,16 +25,20 @@
|
|||
In case of multiple values for an attribute, they are indexed using
|
||||
integers starting with 0.
|
||||
</para>
|
||||
<informalexample>
|
||||
<literallayout>
|
||||
entry["attribute1"] = value
|
||||
entry["attribute2"][0] = value1
|
||||
entry["attribute2"][1] = value2
|
||||
</literallayout>
|
||||
</informalexample>
|
||||
<example>
|
||||
<title>Complete example with authenticated bind</title>
|
||||
<programlisting role="php">
|
||||
<example>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$entree["attribut1"] = "value";
|
||||
$entree["attribut2"][0] = "value1";
|
||||
$entree["attribut2"][1] = "value2";
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
<example>
|
||||
<title>Complete example with authenticated bind</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$ds=ldap_connect("localhost"); // assuming the LDAP server is on this host
|
||||
|
@ -58,8 +62,8 @@ if ($ds) {
|
|||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</programlisting>
|
||||
</example>
|
||||
|
||||
¬e.bin-safe;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<!-- $Revision: 1.6 $ -->
|
||||
<!-- splitted from ./en/functions/ldap.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.ldap-get-attributes">
|
||||
<refnamediv>
|
||||
|
@ -28,9 +28,12 @@
|
|||
directory entries and/or where you do not know the structure of
|
||||
the directory entries. In many applications you will be searching
|
||||
for a specific attribute such as an email address or a surname,
|
||||
and won't care what other data is held.</para>
|
||||
and won't care what other data is held.
|
||||
</para>
|
||||
<para>
|
||||
<informalexample><literallayout>
|
||||
<example>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
return_value["count"] = number of attributes in the entry
|
||||
return_value[0] = first attribute
|
||||
return_value[n] = nth attribute
|
||||
|
@ -38,7 +41,9 @@ return_value[n] = nth attribute
|
|||
return_value["attribute"]["count"] = number of values for attribute
|
||||
return_value["attribute"][0] = first value of the attribute
|
||||
return_value["attribute"][i] = (i+1)th value of the attribute
|
||||
</literallayout></informalexample>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
|
||||
<example>
|
||||
<title>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<!-- splitted from ./en/functions/ldap.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.ldap-get-entries">
|
||||
<refnamediv>
|
||||
|
@ -28,9 +28,9 @@
|
|||
The attribute index is converted to lowercase. (Attributes are
|
||||
case-insensitive for directory servers, but not when used as
|
||||
array indices.)
|
||||
|
||||
<informalexample>
|
||||
<literallayout>
|
||||
<example>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
return_value["count"] = number of entries in the result
|
||||
return_value[0] : refers to the details of first entry
|
||||
|
||||
|
@ -42,12 +42,15 @@ return_value[i][j] = jth attribute in the ith entry in the result
|
|||
return_value[i]["attribute"]["count"] = number of values for
|
||||
attribute in ith entry
|
||||
return_value[i]["attribute"][j] = jth value of attribute in ith entry
|
||||
</literallayout>
|
||||
</informalexample></para>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
See also <function>ldap_first_entry</function> and
|
||||
<function>ldap_next_entry</function></para>
|
||||
<para>
|
||||
See also <function>ldap_first_entry</function> and
|
||||
<function>ldap_next_entry</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
|
|
Loading…
Reference in a new issue