svn: /phpdoc/de/trunk/reference/strings/functions/ chr.xml convert-uuencode.xml crc32.xml htmlspecialchars.xml lcfirst.xml md5-file.xml md5.xml print.xml sha1-file.xml sha1.xml similar-text.xml sprintf.xml str-getcsv.xml str-pad.xml str-shuffle.xml strcspn.xml stristr.xml strstr.xml strtok.xml substr-count.xml ucwords.xml
[email protected] (Christoph Michael Becker)
| Newsgroups | php.doc.de |
|---|---|
| Message-ID | <[email protected]> |
cmb Tue, 17 Apr 2018 21:43:57 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=344697
Log:
Sync with EN
Changed paths:
U phpdoc/de/trunk/reference/strings/functions/chr.xml
U phpdoc/de/trunk/reference/strings/functions/convert-uuencode.xml
U phpdoc/de/trunk/reference/strings/functions/crc32.xml
U phpdoc/de/trunk/reference/strings/functions/htmlspecialchars.xml
U phpdoc/de/trunk/reference/strings/functions/lcfirst.xml
U phpdoc/de/trunk/reference/strings/functions/md5-file.xml
U phpdoc/de/trunk/reference/strings/functions/md5.xml
U phpdoc/de/trunk/reference/strings/functions/print.xml
U phpdoc/de/trunk/reference/strings/functions/sha1-file.xml
U phpdoc/de/trunk/reference/strings/functions/sha1.xml
U phpdoc/de/trunk/reference/strings/functions/similar-text.xml
U phpdoc/de/trunk/reference/strings/functions/sprintf.xml
U phpdoc/de/trunk/reference/strings/functions/str-getcsv.xml
U phpdoc/de/trunk/reference/strings/functions/str-pad.xml
U phpdoc/de/trunk/reference/strings/functions/str-shuffle.xml
U phpdoc/de/trunk/reference/strings/functions/strcspn.xml
U phpdoc/de/trunk/reference/strings/functions/stristr.xml
U phpdoc/de/trunk/reference/strings/functions/strstr.xml
U phpdoc/de/trunk/reference/strings/functions/strtok.xml
U phpdoc/de/trunk/reference/strings/functions/substr-count.xml
U phpdoc/de/trunk/reference/strings/functions/ucwords.xml
svn-diffs-344697.txt
(text/x-diff, 40.5 KB)
Modified: phpdoc/de/trunk/reference/strings/functions/chr.xml
===================================================================
--- phpdoc/de/trunk/reference/strings/functions/chr.xml 2018-04-17 21:36:57 UTC (rev 344696)
+++ phpdoc/de/trunk/reference/strings/functions/chr.xml 2018-04-17 21:43:57 UTC (rev 344697)
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: 334374 Maintainer: sammywg Status: ready -->
+<!-- EN-Revision: 339802 Maintainer: sammywg Status: ready -->
+
<refentry xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://docbook.org/ns/docbook" xml:id="function.chr">
<refnamediv>
<refname>chr</refname>
@@ -30,8 +31,20 @@
<term><parameter>ascii</parameter></term>
<listitem>
<para>
- Der ASCII-Code.
+ Der erweiterte ASCII-Code.
</para>
+ <para>
+ Werte außerhalb des gültigen Bereichs (0..255) werden bitweise mit 255
+ und-verknüpft, was gleichwertig zu folgendem Algorithmus ist:
+ <programlisting role="php">
+<![CDATA[
+while ($ascii < 0) {
+ $ascii += 256;
+}
+$ascii %= 256;
+]]>
+ </programlisting>
+ </para>
</listitem>
</varlistentry>
</variablelist>
@@ -63,6 +76,22 @@
]]>
</programlisting>
</example>
+ <example>
+ <title>Überlauf-Verhalten</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+echo chr(-159), chr(833), PHP_EOL;
+?>
+]]>
+ </programlisting>
+ &example.outputs;
+ <screen>
+<![CDATA[
+aA
+]]>
+ </screen>
+ </example>
</para>
</refsect1>
Modified: phpdoc/de/trunk/reference/strings/functions/convert-uuencode.xml
===================================================================
--- phpdoc/de/trunk/reference/strings/functions/convert-uuencode.xml 2018-04-17 21:36:57 UTC (rev 344696)
+++ phpdoc/de/trunk/reference/strings/functions/convert-uuencode.xml 2018-04-17 21:43:57 UTC (rev 344697)
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: 335376 Maintainer: sammywg Status: ready -->
+<!-- EN-Revision: 343432 Maintainer: sammywg Status: ready -->
+
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.convert-uuencode">
<refnamediv>
<refname>convert_uuencode</refname>
@@ -18,7 +19,7 @@
des UUencode Algorithmus (Unix-to-Unix-Kodierung).
</para>
<para>
- Die Unix-zu-Unix-Kodierung wandelt alle Zeichenketten (auch binäre) in
+ Die Unix-zu-Unix-Kodierung wandelt alle Zeichenketten (einschließlich Binärdaten) in
druckbare Zeichen um, damit ihre korrekte Übermittlung über ein Netzwerk sichergestellt
werden kann. UU-kodierte Daten sind etwa 35 % länger als ihr Original.
</para>
Modified: phpdoc/de/trunk/reference/strings/functions/crc32.xml
===================================================================
--- phpdoc/de/trunk/reference/strings/functions/crc32.xml 2018-04-17 21:36:57 UTC (rev 344696)
+++ phpdoc/de/trunk/reference/strings/functions/crc32.xml 2018-04-17 21:43:57 UTC (rev 344697)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: 326796 Maintainer: sammywg Status: ready -->
+<!-- EN-Revision: 337619 Maintainer: sammywg Status: ready -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.crc32">
<refnamediv>
@@ -65,7 +65,7 @@
<simpara>
Für eine portablere Lösung ist das generische <function>hash</function> in
Erwägung zu ziehen. <code>hash("crc32b", $str)</code> liefert die gleiche
- Zeichenkette wie <code>dechex(crc32($str))</code>.
+ Zeichenkette wie <code>str_pad(dechex(crc32($str)), 8, '0', STR_PAD_LEFT)</code>.
</simpara>
</warning>
</refsect1>
Modified: phpdoc/de/trunk/reference/strings/functions/htmlspecialchars.xml
===================================================================
--- phpdoc/de/trunk/reference/strings/functions/htmlspecialchars.xml 2018-04-17 21:36:57 UTC (rev 344696)
+++ phpdoc/de/trunk/reference/strings/functions/htmlspecialchars.xml 2018-04-17 21:43:57 UTC (rev 344697)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: 334627 Maintainer: sammywg Status: ready -->
+<!-- EN-Revision: 343899 Maintainer: sammywg Status: ready -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.htmlspecialchars" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
@@ -15,7 +15,7 @@
<methodparam><type>string</type><parameter>string</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer>ENT_COMPAT | ENT_HTML401</initializer></methodparam>
<methodparam choice="opt"><type>string</type><parameter>encoding</parameter><initializer>ini_get("default_charset")</initializer></methodparam>
- <methodparam choice="opt"><type>bool</type><parameter>double_encode</parameter><initializer>true</initializer></methodparam>
+ <methodparam choice="opt"><type>bool</type><parameter>double_encode</parameter><initializer>&true;</initializer></methodparam>
</methodsynopsis>
<para>
Bestimmte Zeichen haben in HTML eine spezielle Bedeutung und
@@ -40,36 +40,48 @@
stattdessen verwenden.
</para>
<para>
- Folgende Umwandlungen werden vorgenommen:
- <itemizedlist>
- <listitem>
- <simpara>
- '&' (Ampersand/kaufmännisches Und) wird zu '&amp;'.
- </simpara>
- </listitem>
- <listitem>
- <simpara>
- '"' (doppeltes Anführungszeichen) wird zu '&quot;',
- wenn <constant>ENT_NOQUOTES</constant> nicht gesetzt ist.
- </simpara>
- </listitem>
- <listitem>
- <simpara>
- "'" (einfaches Anführungszeichen) wird nur zu '&#039;' (oder &apos;),
- wenn <constant>ENT_QUOTES</constant> gesetzt ist.
- </simpara>
- </listitem>
- <listitem>
- <simpara>
- '<' (kleiner als) wird zu '&lt;'
- </simpara>
- </listitem>
- <listitem>
- <simpara>
- '>' (größer als) wird zu '&gt;'
- </simpara>
- </listitem>
- </itemizedlist>
+ <table>
+ <title>Durchgeführte Ersetzungen</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Zeichen</entry>
+ <entry>Ersetzung</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry><literal>&</literal> (Kaufmanns-Und)</entry>
+ <entry><literal>&amp;</literal></entry>
+ </row>
+ <row>
+ <entry><literal>"</literal> (doppeltes Anführungszeichen)</entry>
+ <entry>
+ <literal>&quot;</literal>, falls <constant>ENT_NOQUOTES</constant>
+ nicht gesetzt ist
+ </entry>
+ </row>
+ <row>
+ <entry>"'" (einfaches Anführungszeichen)</entry>
+ <entry>
+ <literal>&#039;</literal> (für <constant>ENT_HTML401</constant>) oder
+ <literal>&apos;</literal> (für
+ <constant>ENT_XML1</constant>, <constant>ENT_XHTML</constant> oder
+ <constant>ENT_HTML5</constant>), aber nur wenn
+ <constant>ENT_QUOTES</constant> gesetzt ist
+ </entry>
+ </row>
+ <row>
+ <entry><literal><</literal> (kleiner als)</entry>
+ <entry><literal>&lt;</literal></entry>
+ </row>
+ <row>
+ <entry><literal>></literal> (gößer als)</entry>
+ <entry><literal>&gt;</literal></entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
</para>
</refsect1>
@@ -293,6 +305,52 @@
<function>htmlentities</function>.
</para>
</note>
+ <note>
+ <para>
+ Im Fall von mehrdeutigen <parameter>flags</parameter>-Werten, gelten die
+ folgenden Regeln:
+ </para>
+ <para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ Wird weder <constant>ENT_COMPAT</constant>, <constant>ENT_QUOTES</constant>
+ oder <constant>ENT_NOQUOTES</constant> angegeben, ist der Standardwert
+ <constant>ENT_COMPAT</constant>.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Werden mehrere von <constant>ENT_COMPAT</constant>, <constant>ENT_QUOTES</constant>
+ und <constant>ENT_NOQUOTES</constant> angegeben, erhält <constant>ENT_QUOTES</constant>
+ den Vorrang, gefolgt von <constant>ENT_COMPAT</constant>.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Wird weder <constant>ENT_HTML401</constant>, <constant>ENT_HTML5</constant>,
+ <constant>ENT_XHTML</constant> noch <constant>ENT_XML1</constant> angegeben,
+ ist der Standardwert <constant>ENT_HTML401</constant>.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Werden mehrere von <constant>ENT_HTML401</constant>, <constant>ENT_HTML5</constant>,
+ <constant>ENT_XHTML</constant> und <constant>ENT_XML1</constant> angegeben,
+ erhält <constant>ENT_HTML5</constant> den Vorrang, gefolgt von
+ <constant>ENT_XHTML</constant> und <constant>ENT_HTML401</constant>.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ When more than one of <constant>ENT_DISALLOWED</constant>, <constant>ENT_IGNORE</constant>,
+ <constant>ENT_SUBSTITUTE</constant> are present, <constant>ENT_IGNORE</constant> takes the
+ highest precedence, followed by <constant>ENT_SUBSTITUTE</constant>.
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </para>
+ </note>
</refsect1>
<refsect1 role="seealso">
Modified: phpdoc/de/trunk/reference/strings/functions/lcfirst.xml
===================================================================
--- phpdoc/de/trunk/reference/strings/functions/lcfirst.xml 2018-04-17 21:36:57 UTC (rev 344696)
+++ phpdoc/de/trunk/reference/strings/functions/lcfirst.xml 2018-04-17 21:43:57 UTC (rev 344697)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: 310796 Maintainer: sammywg Status: ready -->
+<!-- EN-Revision: 340242 Maintainer: sammywg Status: ready -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.lcfirst">
<refnamediv>
Modified: phpdoc/de/trunk/reference/strings/functions/md5-file.xml
===================================================================
--- phpdoc/de/trunk/reference/strings/functions/md5-file.xml 2018-04-17 21:36:57 UTC (rev 344696)
+++ phpdoc/de/trunk/reference/strings/functions/md5-file.xml 2018-04-17 21:43:57 UTC (rev 344697)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: 334621 Maintainer: sammywg Status: ready -->
+<!-- EN-Revision: 343899 Maintainer: sammywg Status: ready -->
<refentry xml:id="function.md5-file" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
@@ -12,7 +12,7 @@
<methodsynopsis>
<type>string</type><methodname>md5_file</methodname>
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
- <methodparam choice="opt"><type>bool</type><parameter>raw_output</parameter><initializer>false</initializer></methodparam>
+ <methodparam choice="opt"><type>bool</type><parameter>raw_output</parameter><initializer>&false;</initializer></methodparam>
</methodsynopsis>
<para>
Berechnet den MD5-Code einer Datei, deren Dateiname mit
Modified: phpdoc/de/trunk/reference/strings/functions/md5.xml
===================================================================
--- phpdoc/de/trunk/reference/strings/functions/md5.xml 2018-04-17 21:36:57 UTC (rev 344696)
+++ phpdoc/de/trunk/reference/strings/functions/md5.xml 2018-04-17 21:43:57 UTC (rev 344697)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: 334621 Maintainer: sammywg Status: ready -->
+<!-- EN-Revision: 343899 Maintainer: sammywg Status: ready -->
<refentry xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://docbook.org/ns/docbook" xml:id="function.md5">
<refnamediv>
@@ -8,12 +8,16 @@
<refpurpose>Errechnet den MD5-Hash eines Strings</refpurpose>
</refnamediv>
+ <refsynopsisdiv>
+ &warn.passwordhashing;
+ </refsynopsisdiv>
+
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>md5</methodname>
<methodparam><type>string</type><parameter>str</parameter></methodparam>
- <methodparam choice="opt"><type>bool</type><parameter>raw_output</parameter><initializer>false</initializer></methodparam>
+ <methodparam choice="opt"><type>bool</type><parameter>raw_output</parameter><initializer>&false;</initializer></methodparam>
</methodsynopsis>
<para>
Berechnet den MD5-Hash von <parameter>str</parameter> unter Verwendung
@@ -75,11 +79,6 @@
</para>
</refsect1>
- <refsect1 role="notes">
- &reftitle.notes;
- ¬e.passwordhashing;
- </refsect1>
-
<refsect1 role="seealso">
&reftitle.seealso;
<para>
Modified: phpdoc/de/trunk/reference/strings/functions/print.xml
===================================================================
--- phpdoc/de/trunk/reference/strings/functions/print.xml 2018-04-17 21:36:57 UTC (rev 344696)
+++ phpdoc/de/trunk/reference/strings/functions/print.xml 2018-04-17 21:43:57 UTC (rev 344697)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: 325214 Maintainer: sammywg Status: ready -->
+<!-- EN-Revision: 342214 Maintainer: sammywg Status: ready -->
<refentry xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://docbook.org/ns/docbook" xml:id="function.print">
<refnamediv>
@@ -22,6 +22,11 @@
Sprachkonstrukt), weshalb Sie beim Aufruf nicht unbedingt
Klammern um die Argumentliste setzen müssen.
</para>
+ <para>
+ Der Hauptunterschied zu <literal>echo</literal> besteht darin, dass
+ <literal>print</literal> nur ein einziges Argument entgegen nimmt, und
+ immer 1 zurückgibt.
+ </para>
</refsect1>
<refsect1 role="parameters">
Modified: phpdoc/de/trunk/reference/strings/functions/sha1-file.xml
===================================================================
--- phpdoc/de/trunk/reference/strings/functions/sha1-file.xml 2018-04-17 21:36:57 UTC (rev 344696)
+++ phpdoc/de/trunk/reference/strings/functions/sha1-file.xml 2018-04-17 21:43:57 UTC (rev 344697)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: 334621 Maintainer: sammywg Status: ready -->
+<!-- EN-Revision: 343899 Maintainer: sammywg Status: ready -->
<refentry xml:id="function.sha1-file" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
@@ -13,7 +13,7 @@
<methodsynopsis>
<type>string</type><methodname>sha1_file</methodname>
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
- <methodparam choice="opt"><type>bool</type><parameter>raw_output</parameter><initializer>false</initializer></methodparam>
+ <methodparam choice="opt"><type>bool</type><parameter>raw_output</parameter><initializer>&false;</initializer></methodparam>
</methodsynopsis>
<simpara>
Berechnet den SHA1-Hash der Datei spezifiert durch
Modified: phpdoc/de/trunk/reference/strings/functions/sha1.xml
===================================================================
--- phpdoc/de/trunk/reference/strings/functions/sha1.xml 2018-04-17 21:36:57 UTC (rev 344696)
+++ phpdoc/de/trunk/reference/strings/functions/sha1.xml 2018-04-17 21:43:57 UTC (rev 344697)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: 334621 Maintainer: sammywg Status: ready -->
+<!-- EN-Revision: 343899 Maintainer: sammywg Status: ready -->
<refentry xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://docbook.org/ns/docbook" xml:id="function.sha1">
<refnamediv>
@@ -8,12 +8,16 @@
<refpurpose>Berechnet den SHA1-Hash eines Strings</refpurpose>
</refnamediv>
+ <refsynopsisdiv>
+ &warn.passwordhashing;
+ </refsynopsisdiv>
+
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>sha1</methodname>
<methodparam><type>string</type><parameter>str</parameter></methodparam>
- <methodparam choice="opt"><type>bool</type><parameter>raw_output</parameter><initializer>false</initializer></methodparam>
+ <methodparam choice="opt"><type>bool</type><parameter>raw_output</parameter><initializer>&false;</initializer></methodparam>
</methodsynopsis>
<simpara>
Berechnet den SHA1 Hash von <parameter>str</parameter> unter Verwendung des
@@ -75,11 +79,6 @@
</para>
</refsect1>
- <refsect1 role="notes">
- &reftitle.notes;
- ¬e.passwordhashing;
- </refsect1>
-
<refsect1 role="seealso">
&reftitle.seealso;
<para>
Modified: phpdoc/de/trunk/reference/strings/functions/similar-text.xml
===================================================================
--- phpdoc/de/trunk/reference/strings/functions/similar-text.xml 2018-04-17 21:36:57 UTC (rev 344696)
+++ phpdoc/de/trunk/reference/strings/functions/similar-text.xml 2018-04-17 21:43:57 UTC (rev 344697)
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: 326815 Maintainer: sammywg Status: ready -->
+<!-- EN-Revision: 344329 Maintainer: sammywg Status: ready -->
+
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.similar-text">
<refnamediv>
<refname>similar_text</refname>
@@ -44,6 +45,13 @@
<para>
Die zweite Zeichenkette.
</para>
+ <note>
+ <para>
+ Das Vertauschen der Parameter <parameter>first</parameter> und
+ <parameter>second</parameter> kann ein anderes Ergebnis zur Folge haben;
+ siehe das Beispiel weiter unten.
+ </para>
+ </note>
</listitem>
</varlistentry>
<varlistentry>
@@ -51,8 +59,10 @@
<listitem>
<para>
Falls Sie als Referenz ein drittes Argument angeben, wird
- <function>similar_text</function> Ihnen die Ähnlichkeit als
- Prozentwert errechnen.
+ <function>similar_text</function> die Ähnlichkeit als
+ Prozentwert errechnen. Dazu wird das Ergebnis von <function>similar_text</function>
+ durch den Durchschnitt der Längen der angegebenen Zeichenketten dividiert,
+ und mit <literal>100</literal> multipliziert.
</para>
</listitem>
</varlistentry>
@@ -65,8 +75,42 @@
<para>
Gibt die Anzahl übereinstimmender Zeichen in beiden Zeichenketten zurück.
</para>
+ <para>
+ Die Anzahl übereinstimmender Zeichen wird berechnet, indem die längste erste
+ gemeinsame Teilzeichenkette gesucht wird, und dies dann rekursiv für die Prä-
+ und Suffixe wiederholt wird. Die Längen aller gefundenen gemeinsamen
+ Teilzeichenketten werden aufsummiert.
+ </para>
</refsect1>
+ <refsect1 role="examples">
+ &reftitle.examples;
+ <example xml:id="similar_text.example.swapping">
+ <title>Beispiel für die Vertauschung der Argumente von <function>similar_text</function></title>
+ <para>
+ Dieses Beispiel verdeutlicht, dass das Vertauschen des
+ <parameter>first</parameter> und <parameter>second</parameter> Arguments ein
+ anderes Ergebnis zur Folge haben kann.
+ </para>
+ <programlisting role="php">
+<![CDATA[
+<?php
+$sim = similar_text('bafoobar', 'barfoo', $perc);
+echo "Ähnlichkeit: $sim ($perc %)\n";
+$sim = similar_text('barfoo', 'bafoobar', $perc);
+echo "Ähnlichkeit: $sim ($perc %)\n";
+]]>
+ </programlisting>
+ &example.outputs.similar;
+ <screen>
+<![CDATA[
+Ähnlichkeit: 5 (71.428571428571 %)
+Ähnlichkeit: 3 (42.857142857143 %)
+]]>
+ </screen>
+ </example>
+ </refsect1>
+
<refsect1 role="seealso">
&reftitle.seealso;
<para>
Modified: phpdoc/de/trunk/reference/strings/functions/sprintf.xml
===================================================================
--- phpdoc/de/trunk/reference/strings/functions/sprintf.xml 2018-04-17 21:36:57 UTC (rev 344696)
+++ phpdoc/de/trunk/reference/strings/functions/sprintf.xml 2018-04-17 21:43:57 UTC (rev 344697)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: 336416 Maintainer: sammywg Status: ready -->
+<!-- EN-Revision: 343167 Maintainer: sammywg Status: ready -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.sprintf">
<refnamediv>
@@ -49,7 +49,7 @@
Verwendung eines Vorzeichens (- oder +) vor einer Zahl erzwingt.
Standardmäßig wird nur das - Zeichen vor negativen Zahlen verwendet.
Die Vorzeichenangabe erzwingt, dass positive Zahlen ein + Zeichen
- vorangestellt bekommen, und wurde mit PHP 4.3.0 eingeführt.
+ vorangestellt bekommen.
</simpara>
</listitem>
<listitem>
@@ -134,7 +134,7 @@
<literal>F</literal> - das Argument wird als float angesehen und
unabhängig von den Einstellungen in den locales als Fließkommazahl
ausgegeben.
- Verfügbar ab PHP 4.3.10 und PHP 5.0.3.
+ Verfügbar ab PHP 5.0.3.
</member>
<member>
<literal>g</literal> - das Kürzere von <literal>%e</literal> und
@@ -360,7 +360,7 @@
&reftitle.returnvalues;
<para>
Gibt eine an Hand des Formatierungs-Strings <parameter>format</parameter>
- gebildete Zeichenkette zurück.
+ gebildete Zeichenkette zurück. &return.falseforfailure;
</para>
</refsect1>
@@ -490,6 +490,7 @@
<member><function>fscanf</function></member>
<member><function>vsprintf</function></member>
<member><function>number_format</function></member>
+ <member><function>date</function></member>
</simplelist>
</para>
</refsect1>
Modified: phpdoc/de/trunk/reference/strings/functions/str-getcsv.xml
===================================================================
--- phpdoc/de/trunk/reference/strings/functions/str-getcsv.xml 2018-04-17 21:36:57 UTC (rev 344696)
+++ phpdoc/de/trunk/reference/strings/functions/str-getcsv.xml 2018-04-17 21:43:57 UTC (rev 344697)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: 333317 Maintainer: sammywg Status: ready -->
+<!-- EN-Revision: 344694 Maintainer: sammywg Status: ready -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.str-getcsv">
<refnamediv>
@@ -23,6 +23,14 @@
Parst eine Zeichenketten Eingabe für Felder im <acronym>CSV</acronym> Format
und gibt ein Array mit den gelesenen Feldern zurück.
</para>
+ <note>
+ <para>
+ Diese Funktion berücksichtigt die Locale-Einstellungen. Ist
+ <literal>LC_CTYPE</literal> beispielsweise <literal>de_DE.UTF-8</literal>,
+ werden Zeichenketten in Ein-Byte-Kodierungen von dieser Funktion
+ möglicherweise falsch geparst.
+ </para>
+ </note>
</refsect1>
<refsect1 role="parameters">
@@ -60,6 +68,18 @@
Bestimmt das Maskierungszeichen (nur ein Zeichen). Standardmäßig wird
ein Backslash (<literal>\</literal>) verwendet.
</para>
+ <note>
+ <simpara>
+ Normalerweise wird ein <parameter>enclosure</parameter>-Zeichen innerhalb
+ eines Feldes maskiert, indem es verdoppelt wird; allerdings kann das
+ <parameter>escape</parameter>-Zeichen als Alternative verwendet werden.
+ Also haben für die Standard-Parameterwerte <literal>""</literal> und
+ <literal>\"</literal> dieselbe Bedeutung. Außer der möglichen Maskierung
+ des <parameter>enclosure</parameter>-Zeichens hat das
+ <parameter>escape</parameter>-Zeichen keine besondere Bedeutung; es kann
+ nicht einmal verwendet werden, um sich selbst zu maskieren.
+ </simpara>
+ </note>
</listitem>
</varlistentry>
</variablelist>
Modified: phpdoc/de/trunk/reference/strings/functions/str-pad.xml
===================================================================
--- phpdoc/de/trunk/reference/strings/functions/str-pad.xml 2018-04-17 21:36:57 UTC (rev 344696)
+++ phpdoc/de/trunk/reference/strings/functions/str-pad.xml 2018-04-17 21:43:57 UTC (rev 344697)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: 297028 Maintainer: sammywg Status: ready -->
+<!-- EN-Revision: 343731 Maintainer: sammywg Status: ready -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.str-pad">
<refnamediv>
@@ -19,7 +19,7 @@
<methodparam choice="opt"><type>int</type><parameter>pad_type</parameter><initializer>STR_PAD_RIGHT</initializer></methodparam>
</methodsynopsis>
<para>
- Die Funktion gibt den <parameter>input</parameter>-String, erweitert auf
+ Diese Funktion gibt den <parameter>input</parameter>-String, erweitert auf
der linken, rechten oder auf beiden Seiten auf die angegebene Länge, zurück.
Wenn das optionale Argument <parameter>pad_string</parameter> nicht
angegeben ist, wird <parameter>input</parameter> durch Leerzeichen
@@ -46,7 +46,7 @@
<para>
Wenn der Wert von <parameter>pad_length</parameter> negativ, kürzer als
oder gleich der Länge der Eingabezeichenkette ist, wird keine Erweiterung
- durchgeführt.
+ durchgeführt, und <parameter>input</parameter> wird unverändert zurückgegeben.
</para>
</listitem>
</varlistentry>
@@ -98,7 +98,8 @@
echo str_pad($input, 10); // ergibt "Alien "
echo str_pad($input, 10, "-=", STR_PAD_LEFT); // ergibt "-=-=-Alien"
echo str_pad($input, 10, "_", STR_PAD_BOTH); // ergibt "__Alien___"
-echo str_pad($input, 6 , "___"); // ergibt "Alien_"
+echo str_pad($input, 6, "___"); // ergibt "Alien_"
+echo str_pad($input, 3, "*"); // produces "Alien"
?>
]]>
</programlisting>
Modified: phpdoc/de/trunk/reference/strings/functions/str-shuffle.xml
===================================================================
--- phpdoc/de/trunk/reference/strings/functions/str-shuffle.xml 2018-04-17 21:36:57 UTC (rev 344696)
+++ phpdoc/de/trunk/reference/strings/functions/str-shuffle.xml 2018-04-17 21:43:57 UTC (rev 344697)
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: 297028 Maintainer: sammywg Status: ready -->
-<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.str-shuffle">
+<!-- EN-Revision: 344693 Maintainer: sammywg Status: ready -->
+
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="function.str-shuffle">
<refnamediv>
<refname>str_shuffle</refname>
<refpurpose>Mischt einen String nach dem Zufallsprinzip</refpurpose>
@@ -17,6 +18,7 @@
<function>str_shuffle</function> mischt eine Zeichenkette. Es entsteht eine
Permutation aller vorhandenen Zeichen.
</simpara>
+ &caution.cryptographically-insecure;
</refsect1>
<refsect1 role="parameters">
@@ -42,6 +44,34 @@
</para>
</refsect1>
+ <refsect1 role="changelog">
+ &reftitle.changelog;
+ <para>
+ <informaltable>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>&Version;</entry>
+ <entry>&Description;</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>7.1.0</entry>
+ <entry>
+ Der interne Zufallsalgorithmus <link
+ linkend="migration71.incompatible.rand-srand-aliases">wurde
+ geändert</link>, und verwendet nun den <link
+ xlink:href="&url.mersenne;">Mersenne Twister</link>
+ Zufallszahlengenerator statt der rand Funktion von libc.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </para>
+ </refsect1>
+
<refsect1 role="examples">
&reftitle.examples;
<para>
Modified: phpdoc/de/trunk/reference/strings/functions/strcspn.xml
===================================================================
--- phpdoc/de/trunk/reference/strings/functions/strcspn.xml 2018-04-17 21:36:57 UTC (rev 344696)
+++ phpdoc/de/trunk/reference/strings/functions/strcspn.xml 2018-04-17 21:43:57 UTC (rev 344697)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: 334605 Maintainer: sammywg Status: ready -->
+<!-- EN-Revision: 338016 Maintainer: sammywg Status: ready -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.strcspn">
<refnamediv>
@@ -12,16 +12,23 @@
&reftitle.description;
<methodsynopsis>
<type>int</type><methodname>strcspn</methodname>
- <methodparam><type>string</type><parameter>str1</parameter></methodparam>
- <methodparam><type>string</type><parameter>str2</parameter></methodparam>
+ <methodparam><type>string</type><parameter>subject</parameter></methodparam>
+ <methodparam><type>string</type><parameter>mask</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>start</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>length</parameter></methodparam>
</methodsynopsis>
<para>
- Gibt die Länge von <parameter>str1</parameter> zurück, bis zu der
- <emphasis>kein</emphasis> Zeichen aus <parameter>str2</parameter>
+ Gibt die Länge von <parameter>subject</parameter> zurück, bis zu der
+ <emphasis>kein</emphasis> Zeichen aus <parameter>mask</parameter>
vorkommt.
</para>
+ <para>
+ Wenn die Parameter <parameter>start</parameter> und <parameter>length</parameter>
+ ausgelassen werden, dann wird das gesamte <parameter>subject</parameter> untersucht.
+ Werden sie angegeben, dann ist es gleichwertig zum Aufruf von
+ <literal>strcspn(substr($subject, $start, $length), $mask)</literal>
+ (siehe <xref linkend="function.substr" /> für weitere Informationen).
+ </para>
</refsect1>
<refsect1 role="parameters">
@@ -29,18 +36,18 @@
<para>
<variablelist>
<varlistentry>
- <term><parameter>str1</parameter></term>
+ <term><parameter>subject</parameter></term>
<listitem>
<para>
- Die erste Zeichenkette.
+ Die zu untersuchende Zeichenkette.
</para>
</listitem>
</varlistentry>
<varlistentry>
- <term><parameter>str2</parameter></term>
+ <term><parameter>mask</parameter></term>
<listitem>
<para>
- Die zweite Zeichenkette.
+ Die Zeichenkette, die jedes nicht erlaubte Zeichen enthält.
</para>
</listitem>
</varlistentry>
@@ -48,8 +55,22 @@
<term><parameter>start</parameter></term>
<listitem>
<para>
- Die Anfangsposition der zu untersuchenden Zeichenkette.
+ Die Position in <parameter>subject</parameter>, an der die Suche beginnt.
</para>
+ <para>
+ Wird <parameter>start</parameter> angegeben und es nicht negativ ist, dann
+ beginnt <function>strcspn</function> das <parameter>subject</parameter>
+ an der <parameter>start</parameter> Position zu untersuchen.
+ Beispielsweise ist in der Zeichenkette '<literal>abcdef</literal>' das
+ Zeichen an Position <literal>0</literal> ein '<literal>a</literal>', das
+ Zeichen an Position <literal>2</literal> ein '<literal>c</literal>', usw.
+ </para>
+ <para>
+ Wird <parameter>start</parameter> angegeben und es negativ ist, dann
+ beginnt <function>strcspn</function> das <parameter>subject</parameter> an
+ der <parameter>start</parameter> Position vom Ende von
+ <parameter>subject</parameter> zu untersuchen.
+ </para>
</listitem>
</varlistentry>
<varlistentry>
@@ -56,8 +77,21 @@
<term><parameter>length</parameter></term>
<listitem>
<para>
- Die Länge der zu untersuchenden Zeichenkette.
+ Die Länge des Segments von <parameter>subject</parameter>, das untersucht
+ werden soll.
</para>
+ <para>
+ Wird <parameter>length</parameter> angegeben und es nicht negativ ist,
+ dann wird <parameter>subject</parameter> für
+ <parameter>length</parameter> Zeichen nach der Anfangsposition
+ untersucht.
+ </para>
+ <para>
+ Wird <parameter>length</parameter> angegeben und es negativ ist, dann
+ wird <parameter>subject</parameter> von der Anfangsposition bis zu
+ <parameter>length</parameter> Zeichen vom Ende von
+ <parameter>subject</parameter> untersucht.
+ </para>
</listitem>
</varlistentry>
</variablelist>
@@ -67,8 +101,17 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
- Gibt die Länge des gefundenen Segments als Integerwert zurück.
+ Gibt die Länge des Anfangssegments von <parameter>subject</parameter> zurück,
+ das ausschließlich aus Zeichen besteht, die <emphasis>nicht</emphasis> in
+ <parameter>mask</parameter> vorkommen.
</para>
+ <note>
+ <para>
+ Wird der <parameter>start</parameter> Parameter angegeben, dann zählt die
+ zurückgegebene Länge von dieser Position, nicht vom Anfang von
+ <parameter>subject</parameter>.
+ </para>
+ </note>
</refsect1>
<refsect1 role="examples">
@@ -82,11 +125,15 @@
$b = strcspn('abcd', 'banana');
$c = strcspn('hello', 'l');
$d = strcspn('hello', 'world');
+$e = strcspn('abcdhelloabcd', 'abcd', -9);
+$f = strcspn('abcdhelloabcd', 'abcd', -9, -5);
var_dump($a);
var_dump($b);
var_dump($c);
var_dump($d);
+var_dump($e);
+var_dump($f);
?>
]]>
</programlisting>
@@ -97,6 +144,8 @@
int(0)
int(2)
int(2)
+int(5)
+int(4)
]]>
</screen>
</example>
Modified: phpdoc/de/trunk/reference/strings/functions/stristr.xml
===================================================================
--- phpdoc/de/trunk/reference/strings/functions/stristr.xml 2018-04-17 21:36:57 UTC (rev 344696)
+++ phpdoc/de/trunk/reference/strings/functions/stristr.xml 2018-04-17 21:43:57 UTC (rev 344697)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: 323218 Maintainer: sammywg Status: ready -->
+<!-- EN-Revision: 343899 Maintainer: sammywg Status: ready -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.stristr">
<refnamediv>
@@ -15,7 +15,7 @@
<type>string</type><methodname>stristr</methodname>
<methodparam><type>string</type><parameter>haystack</parameter></methodparam>
<methodparam><type>mixed</type><parameter>needle</parameter></methodparam>
- <methodparam choice="opt"><type>bool</type><parameter>before_needle</parameter><initializer>false</initializer></methodparam>
+ <methodparam choice="opt"><type>bool</type><parameter>before_needle</parameter><initializer>&false;</initializer></methodparam>
</methodsynopsis>
<para>
Gibt den String <parameter>haystack</parameter> ab dem ersten Vorkommen (inklusive)
Modified: phpdoc/de/trunk/reference/strings/functions/strstr.xml
===================================================================
--- phpdoc/de/trunk/reference/strings/functions/strstr.xml 2018-04-17 21:36:57 UTC (rev 344696)
+++ phpdoc/de/trunk/reference/strings/functions/strstr.xml 2018-04-17 21:43:57 UTC (rev 344697)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: 323216 Maintainer: sammywg Status: ready -->
+<!-- EN-Revision: 343899 Maintainer: sammywg Status: ready -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.strstr">
<refnamediv>
@@ -14,7 +14,7 @@
<type>string</type><methodname>strstr</methodname>
<methodparam><type>string</type><parameter>haystack</parameter></methodparam>
<methodparam><type>mixed</type><parameter>needle</parameter></methodparam>
- <methodparam choice="opt"><type>bool</type><parameter>before_needle</parameter><initializer>false</initializer></methodparam>
+ <methodparam choice="opt"><type>bool</type><parameter>before_needle</parameter><initializer>&false;</initializer></methodparam>
</methodsynopsis>
<para>
Gibt den Teil der Zeichenkette <parameter>haystack</parameter> ab dem
Modified: phpdoc/de/trunk/reference/strings/functions/strtok.xml
===================================================================
--- phpdoc/de/trunk/reference/strings/functions/strtok.xml 2018-04-17 21:36:57 UTC (rev 344696)
+++ phpdoc/de/trunk/reference/strings/functions/strtok.xml 2018-04-17 21:43:57 UTC (rev 344697)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: 288721 Maintainer: sammywg Status: ready -->
+<!-- EN-Revision: 341282 Maintainer: sammywg Status: ready -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.strtok" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
@@ -96,13 +96,8 @@
</example>
</para>
<para>
- Das Verhalten der Funktion beim Auffinden eines leeren Teils wurde in PHP
- 4.1.0 verändert. Zuvor wurde ein leerer String zurückgegeben, wohingegen das
- neue, korrekte Verhalten diesen Teil des Strings verwirft.
- </para>
- <para>
<example>
- <title>Altes Verhalten von <function>strtok</function></title>
+ <title>Verhalten von <function>strtok</function> beim Auffinden eines leeren Teils</title>
<programlisting role="php">
<![CDATA[
<?php
@@ -115,26 +110,7 @@
&example.outputs;
<screen>
<![CDATA[
- string(0) ""
string(11) "irgendetwas"
-]]>
- </screen>
- </example>
- <example>
- <title>Neues Verhalten von <function>strtok</function></title>
- <programlisting role="php">
-<![CDATA[
-<?php
-$erster_token = strtok('/irgendetwas', '/');
-$zweiter_token = strtok('/');
-var_dump($erster_token, $zweiter_token);
-?>
-]]>
- </programlisting>
- &example.outputs;
- <screen>
-<![CDATA[
- string(11) "irgendetwas"
bool(false)
]]>
</screen>
Modified: phpdoc/de/trunk/reference/strings/functions/substr-count.xml
===================================================================
--- phpdoc/de/trunk/reference/strings/functions/substr-count.xml 2018-04-17 21:36:57 UTC (rev 344696)
+++ phpdoc/de/trunk/reference/strings/functions/substr-count.xml 2018-04-17 21:43:57 UTC (rev 344697)
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: 309710 Maintainer: sammywg Status: ready -->
+<!-- EN-Revision: 340032 Maintainer: sammywg Status: ready -->
+
<refentry xml:id="function.substr-count" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>substr_count</refname>
@@ -55,7 +56,8 @@
<term><parameter>offset</parameter></term>
<listitem>
<para>
- Die Zeichenposition, an der die Zählung begonnen werden soll
+ Die Zeichenposition, an der die Zählung begonnen werden soll.
+ Ist diese negativ, beginnt die Zählung am Ende der Zeichenkette.
</para>
</listitem>
</varlistentry>
@@ -67,6 +69,7 @@
dem Substring gesucht werden soll. Es wird eine Warnung ausgegeben,
wenn Offset plus Länge größer als die Länge von
<parameter>haystack</parameter> sind.
+ Eine negative Länge zählt vom Ende des <parameter>haystack</parameter> an.
</para>
</listitem>
</varlistentry>
@@ -94,6 +97,13 @@
</thead>
<tbody>
<row>
+ <entry>7.1.0</entry>
+ <entry>
+ Unterstützung für negative <parameter>offset</parameter> und
+ <parameter>length</parameter> Argumente wurde hinzugefügt.
+ </entry>
+ </row>
+ <row>
<entry>5.1.0</entry>
<entry>
Hinzufügen der Parameter <parameter>offset</parameter> und
Modified: phpdoc/de/trunk/reference/strings/functions/ucwords.xml
===================================================================
--- phpdoc/de/trunk/reference/strings/functions/ucwords.xml 2018-04-17 21:36:57 UTC (rev 344696)
+++ phpdoc/de/trunk/reference/strings/functions/ucwords.xml 2018-04-17 21:43:57 UTC (rev 344697)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: 297028 Maintainer: sammywg Status: ready -->
+<!-- EN-Revision: 337118 Maintainer: sammywg Status: ready -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.ucwords">
<refnamediv>
@@ -25,8 +25,9 @@
</para>
<para>
Als Wort wird hierbei eine Zeichenkette verstanden, die einem
- Whitespace (Leerzeichen, Seitenvorschub, Zeilenvorschub, Wagenrücklauf
- sowie horizontalem und vertikalem Tabulatorzeichen) folgt.
+ Zeichen, das im <parameter>delimiters</parameter> Parameter enthalten ist folgt.
+ (Standardmäßig sind dies: Leerzeichen, Seitenvorschub, Zeilenvorschub, Wagenrücklauf
+ sowie horizontales und vertikales Tabulatorzeichen).
</para>
</refsect1>
@@ -46,7 +47,7 @@
<term><parameter>delimiters</parameter></term>
<listitem>
<para>
- Der optionale <parameter>delimiters</parameter> Parameter, enthält die Wort-Trenzeichen.
+ Der optionale <parameter>delimiters</parameter> Parameter enthält die Wort-Trenzeichen.
</para>
</listitem>
</varlistentry>
@@ -76,7 +77,7 @@
<row>
<entry>5.4.32, 5.5.16</entry>
<entry>
- Parameter <parameter>delimiters</parameter> wurde hinzugefügt.
+ Der Parameter <parameter>delimiters</parameter> wurde hinzugefügt.
</entry>
</row>
</tbody>
@@ -106,7 +107,7 @@
</para>
<para>
<example>
- <title><function>ucwords</function>-Beispiel mit Trenzeichen</title>
+ <title><function>ucwords</function>-Beispiel mit benutzerdefinierten Trenzeichen</title>
<programlisting role="php">
<![CDATA[
<?php