svn: /phpdoc/de/trunk/language/ constants.xml context.xml exceptions.xml expressions.xml functions.xml generators.xml types.xml

[email protected] (Christoph Michael Becker)
Newsgroups php.doc.de
Message-ID <[email protected]>
cmb                                      Mon, 30 Oct 2017 15:54:20 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=343333

Log:
Sync with EN

Changed paths:
    U   phpdoc/de/trunk/language/constants.xml
    U   phpdoc/de/trunk/language/context.xml
    U   phpdoc/de/trunk/language/exceptions.xml
    U   phpdoc/de/trunk/language/expressions.xml
    U   phpdoc/de/trunk/language/functions.xml
    U   phpdoc/de/trunk/language/generators.xml
    U   phpdoc/de/trunk/language/types.xml
svn-diffs-343333.txt (text/x-diff, 11.2 KB)
Modified: phpdoc/de/trunk/language/constants.xml
===================================================================
--- phpdoc/de/trunk/language/constants.xml	2017-10-30 14:40:37 UTC (rev 343332)
+++ phpdoc/de/trunk/language/constants.xml	2017-10-30 15:54:20 UTC (rev 343333)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!-- $Revision$ -->
-<!-- EN-Revision: 339565 Maintainer: sammywg Status: ready -->
+<!-- EN-Revision: 343089 Maintainer: sammywg Status: ready -->
  <chapter xml:id="language.constants" xmlns="http://docbook.org/ns/docbook">
   <title>Konstanten</title>

@@ -216,6 +216,15 @@
     </para>
    </note>

+   <note>
+    <para>
+     Konstanten, die mittels des <literal>const</literal> Schlüsselworts definiert
+     wurden, sind immer case-sensitive (Groß-/Kleinschreibung wird unterschieden),
+     während Konstanten, die mittels <function>define</function> definiert wurden,
+     case-insensitive (Groß-/Kleinschreibung spielt keine Rolle) sein können.
+    </para>
+   </note>
+
    <simpara>
     Lesen Sie ebenfalls den Abschnitt über <link
     linkend="language.oop5.constants">Klassenkonstanten</link>.
@@ -235,10 +244,13 @@
    </simpara>

    <para>
-    Es gibt acht magische Konstanten, die, abhängig davon, wo sie eingesetzt
+    Es gibt neun magische Konstanten, die, abhängig davon, wo sie eingesetzt
     werden, einen unterschiedlichen Wert haben. Zum Beispiel hängt
     der Wert der Konstanten <constant>__LINE__</constant> davon ab, in welcher
-    Zeile ihres Skripts Sie diese Konstante verwenden. Diese besonderen
+    Zeile ihres Skripts Sie diese Konstante verwenden.
+    Alle diese "magischen" Konstanten werden während der Kompilierzeit aufgelöst, im
+    Gegensatz zu regulären Konstanten, die während der Laufzeit aufgelöst werden.
+    Diese besonderen
     Konstanten sind unabhängig von Groß-/Kleinschreibung und sind folgende:
    </para>
    <para>
@@ -311,10 +323,18 @@
          Der Name des aktuellen Namespace.
         </entry>
        </row>
+       <row xml:id="constant.coloncolonclass">
+        <entry><constant>ClassName::class</constant></entry>
+        <entry>
+         Der vollständig qualifizierte Klassenname. Siehe auch
+         <link linkend="language.oop5.basic.class.class">::class</link>.
+        </entry>
+       </row>
       </tbody>
      </tgroup>
     </table>
    </para>
+<!-- <link linkend="language.oop5.basic.class.class">::class</link> -->
    <para>
     Siehe auch
     <function>get_class</function>,
@@ -337,6 +357,12 @@
        </thead>
        <tbody>
         <row>
+         <entry>5.5.0</entry>
+         <entry>
+          Magische <constant>::class</constant> Konstante hinzugefügt
+         </entry>
+        </row>
+        <row>
          <entry>5.4.0</entry>
          <entry>
           <constant>__TRAIT__</constant> Konstante hinzugefügt

Modified: phpdoc/de/trunk/language/context.xml
===================================================================
--- phpdoc/de/trunk/language/context.xml	2017-10-30 14:40:37 UTC (rev 343332)
+++ phpdoc/de/trunk/language/context.xml	2017-10-30 15:54:20 UTC (rev 343333)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!-- $Revision$ -->
-<!-- EN-Revision: 333393 Maintainer: simp  Status: ready -->
+<!-- EN-Revision: 342242 Maintainer: simp  Status: ready -->
 <!-- Credits: hholzgra -->

 <reference xml:id="context" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
@@ -26,7 +26,8 @@
  &language.context.phar;
  &language.context.mongodb;
  &language.context.parameters;
-
+&language.context.zip;
+
 </reference>

 <!-- Keep this comment at the end of the file

Modified: phpdoc/de/trunk/language/exceptions.xml
===================================================================
--- phpdoc/de/trunk/language/exceptions.xml	2017-10-30 14:40:37 UTC (rev 343332)
+++ phpdoc/de/trunk/language/exceptions.xml	2017-10-30 15:54:20 UTC (rev 343333)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!-- $Revision$ -->
-<!-- EN-Revision: 336948 Maintainer: sammywg Status: ready -->
+<!-- EN-Revision: 342628 Maintainer: sammywg Status: ready -->

  <chapter xml:id="language.exceptions" xmlns="http://docbook.org/ns/docbook">
   <title>Ausnahmebehandlung (Exception-Handling)</title>
@@ -255,6 +255,12 @@
     keine Behandlung mittels <function>set_exception_handler</function>
     definiert wurde.
    </para>
+   <para>
+    In PHP 7.1 und später kann ein &catch;-Block mehrere Exceptions getrennt
+    durch Pipe-Zeichen (<literal>|</literal>) angeben. Dies ist nützlich, wenn
+    unterschiedliche Exceptions von unterschiedlichen Klassenhierarchien gleich
+    behandelt werden sollen.
+   </para>
   </simplesect>

   <simplesect xml:id="language.exceptions.finally">
@@ -405,6 +411,39 @@
 ]]>
     </screen>
    </example>
+   <example>
+    <title>Multi catch exception handling</title>
+    <programlisting role="php">
+<![CDATA[
+<?php
+
+class MyException extends Exception { }
+
+class MyOtherException extends Exception { }
+
+class Test {
+    public function testing() {
+        try {
+            throw new MyException();
+        } catch (MyException | MyOtherException $e) {
+            var_dump(get_class($e));
+        }
+    }
+}
+
+$foo = new Test;
+$foo->testing();
+
+?>
+]]>
+    </programlisting>
+    &example.outputs;
+    <screen>
+<![CDATA[
+string(11) "MyException"
+]]>
+    </screen>
+   </example>
   </simplesect>

  </chapter>

Modified: phpdoc/de/trunk/language/expressions.xml
===================================================================
--- phpdoc/de/trunk/language/expressions.xml	2017-10-30 14:40:37 UTC (rev 343332)
+++ phpdoc/de/trunk/language/expressions.xml	2017-10-30 15:54:20 UTC (rev 343333)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!-- $Revision$ -->
-<!-- EN-Revision: 307738 Maintainer: sammywg Status: ready -->
+<!-- EN-Revision: 342074 Maintainer: sammywg Status: ready -->

 <chapter xml:id="language.expressions" xmlns="http://docbook.org/ns/docbook">
  <title>Ausdrücke</title>

Modified: phpdoc/de/trunk/language/functions.xml
===================================================================
--- phpdoc/de/trunk/language/functions.xml	2017-10-30 14:40:37 UTC (rev 343332)
+++ phpdoc/de/trunk/language/functions.xml	2017-10-30 15:54:20 UTC (rev 343333)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!-- $Revision$ -->
-<!-- EN-Revision: 340960 Maintainer: cmb Status: ready -->
+<!-- EN-Revision: 342597 Maintainer: cmb Status: ready -->
 <!-- Credits: hholzgra, tom, updated to fix build by theseer -->

  <chapter xml:id="language.functions" xmlns="http://docbook.org/ns/docbook">
@@ -476,6 +476,14 @@
          </entry>
          <entry>PHP 7.0.0</entry>
         </row>
+        <row>
+         <entry><literal>iterable</literal></entry>
+         <entry>
+          Der Parameter muss entweder ein <type>Array</type> oder ein
+          &instanceof; <classname>Traversable</classname> sein.
+         </entry>
+         <entry>PHP 7.1.0</entry>
+        </row>
        </tbody>
       </tgroup>
      </informaltable>
@@ -1409,6 +1417,9 @@
    <simpara>
     Closures können ebenfalls Variablen aus dem Eltern-Gültigkeitsbereich erben.
     Jede solche Variable muss an das <literal>use</literal>-Sprachkonstrukt übergeben werden.
+    Von PHP 7.1 an dürfen diese Variablen keine &link.superglobals;,
+    <varname>$this</varname> oder Variablen mit dem gleichen Name wie ein
+    Paramter sein.
    </simpara>

    <example>
@@ -1595,14 +1606,18 @@
 <![CDATA[
 <?php

-new class {
+class Foo
+{
     function __construct()
     {
-        (static function() {
+        $func = static function() {
             var_dump($this);
-        })();
+        };
+        $func();
     }
 };
+new Foo();
+
 ?>
 ]]>
       </programlisting>
@@ -1623,9 +1638,12 @@
 <![CDATA[
 <?php

-(static function() {
+$func = static function() {
     // function body
-})->call(new StdClass);
+};
+$func = $func->bindTo(new StdClass);
+$func();
+
 ?>
 ]]>
       </programlisting>
@@ -1632,7 +1650,7 @@
       &example.outputs;
       <screen>
 <![CDATA[
-Warning: Cannot bind an instance to a static closure in /in/sLLS9 on line 5
+Warning: Cannot bind an instance to a static closure in %s on line %d
 ]]>
       </screen>
      </example>
@@ -1652,6 +1670,14 @@
        </thead>
        <tbody>
         <row>
+         <entry>7.1.0</entry>
+         <entry>
+          Anonyme Funktionen dürfen &link.superglobals;, <varname>$this</varname>
+          und alle Variablen mit dem gleichen Namen wie Parameter nicht als freie
+          Variablen verwenden.
+         </entry>
+        </row>
+        <row>
          <entry>5.4.0</entry>
          <entry>
           Anonyme Funktionen können sowohl <varname>$this</varname> verwenden

Modified: phpdoc/de/trunk/language/generators.xml
===================================================================
--- phpdoc/de/trunk/language/generators.xml	2017-10-30 14:40:37 UTC (rev 343332)
+++ phpdoc/de/trunk/language/generators.xml	2017-10-30 15:54:20 UTC (rev 343333)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!-- $Revision$ -->
-<!-- EN-Revision: 339531 Maintainer: nobody Status: ready -->
+<!-- EN-Revision: 342576 Maintainer: cmb Status: ready -->

 <chapter xml:id="language.generators" xmlns="http://docbook.org/ns/docbook">
  <title>Generatoren</title>
@@ -138,10 +138,12 @@

   <note>
    <para>
-    Ein Generator kann keine Werte zurückgeben: macht man dies, wird ein
+    In PHP 5 konnte ein Generator keine Werte zurückgeben: machte man dies, wurde ein
     Kompilierungsfehler zurückgegeben. Eine leere
-    <command>return</command>-Anweisung ist eine gültige Syntax innerhalb
-    eines Generators und wird den Generator beenden.
+    <command>return</command>-Anweisung war eine gültige Syntax innerhalb
+    eines Generators und beendete den Generator.
+    Seit PHP 7.0 kann ein Generator Werte zurückliefern, die unter Verwendung von
+    <methodname>Generator::getReturn</methodname> ermittelt werden können.
    </para>
   </note>


Modified: phpdoc/de/trunk/language/types.xml
===================================================================
--- phpdoc/de/trunk/language/types.xml	2017-10-30 14:40:37 UTC (rev 343332)
+++ phpdoc/de/trunk/language/types.xml	2017-10-30 15:54:20 UTC (rev 343333)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!-- $Revision$ -->
-<!-- EN-Revision: 339784 Maintainer: hholzgra Status: ready -->
+<!-- EN-Revision: 342500 Maintainer: hholzgra Status: ready -->
 <!-- CREDITS: samesch, betz -->
 <chapter xml:id="language.types" xmlns="http://docbook.org/ns/docbook">
  <title>Typen</title>
@@ -9,7 +9,7 @@
   <title>Einführung</title>

   <simpara>
-   PHP unterstützt acht primitive Typen.
+   PHP unterstützt zehn primitive Typen.
   </simpara>

   <para>
@@ -45,7 +45,7 @@
   </itemizedlist>

   <para>
-   Drei zusammengesetzte Typen:
+   Vier zusammengesetzte Typen:
   </para>

   <itemizedlist>
@@ -68,6 +68,12 @@
     </simpara>
    </listitem>

+   <listitem>
+    <simpara>
+     <type>Iterable</type>
+    </simpara>
+   </listitem>
+
   </itemizedlist>

   <para>
@@ -216,6 +222,7 @@
  &language.types.float;
  &language.types.string;
  &language.types.array;
+ &language.types.iterable;
  &language.types.object;
  &language.types.resource;
  &language.types.null;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.