<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/language.basic-syntax.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'de',
  ),
  'this' => 
  array (
    0 => 'language.basic-syntax.comments.php',
    1 => 'Kommentare',
    2 => 'Kommentare',
  ),
  'up' => 
  array (
    0 => 'language.basic-syntax.php',
    1 => 'Grundlagen der Syntax',
  ),
  'prev' => 
  array (
    0 => 'language.basic-syntax.instruction-separation.php',
    1 => 'Die Trennung von Anweisungen',
  ),
  'next' => 
  array (
    0 => 'language.types.php',
    1 => 'Typen',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'de',
    'path' => 'language/basic-syntax.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="language.basic-syntax.comments" class="sect1">
   <h2 class="title">Kommentare</h2>
   <p class="para">
    PHP unterstützt &#039;C&#039;-, &#039;C++&#039;- und Unix-Shell-artige (Perl-artige)
    Kommentare. Zum Beispiel:
   </p>
   <p class="para">
    <div class="example" id="example-1">
     <p><strong>Beispiel #1 Kommentare</strong></p>
     <div class="example-contents">
<div class="annotation-interactive phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />    </span><span style="color: #007700">echo </span><span style="color: #DD0000">"Dies ist ein Test\n"</span><span style="color: #007700">; </span><span style="color: #FF8000">// Dies ist ein einzeiliger Kommentar im C++-Stil<br />    /* Dies ist ein mehrzeiliger Kommentar<br />       noch eine weitere Kommentarzeile */<br />    </span><span style="color: #007700">echo </span><span style="color: #DD0000">"Dies ist noch ein Test\n"</span><span style="color: #007700">;<br />    echo </span><span style="color: #DD0000">"... und ein letzter Test\n"</span><span style="color: #007700">; </span><span style="color: #FF8000"># Dies ist ein einzeiliger Kommentar im Shell-Stil<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
     </div>

    </div>
   </p>
   <p class="simpara">
    Die &quot;einzeiligen&quot; Kommentar-Arten kommentieren sämtlichen Text bis zum
    Zeilenende oder bis zum Ende des aktuellen PHP-Blocks aus, je nachdem, was
    zuerst eintritt. Das bedeutet, das HTML-Code nach <code class="literal">// ...
    ?&gt;</code> oder <code class="literal"># ... ?&gt;</code> ausgegeben WIRD: ?&gt;
    beendet den PHP-Modus und kehrt in den HTML-Modus zurück, so dass sich
    <code class="literal">//</code> oder <code class="literal">#</code> nicht darauf auswirkt.
   </p>
   <p class="para">
    <div class="example" id="example-2">
     <p><strong>Beispiel #2 Einzeilige Kommentare</strong></p>
     <div class="example-contents">
<div class="annotation-interactive phpcode"><code><span style="color: #000000">&lt;h1&gt;Dies ist ein <span style="color: #0000BB">&lt;?php </span><span style="color: #FF8000"># echo 'einfaches';</span><span style="color: #0000BB">?&gt;</span> Beispiel.&lt;/h1&gt;<br />&lt;p&gt;Obige Überschrift wird lauten: 'Dies ist ein  Beispiel.'.</span></code></div>
     </div>

    </div>
   </p>
   <p class="simpara">
    &#039;C&#039;-artige Kommentare enden am ersten Vorkommen von <code class="literal">*/</code>.
    Achten Sie daher darauf, &#039;C&#039;-artige Kommentare nicht zu verschachteln.
    Dieser Fehler entsteht leicht, wenn Sie längere Code-Blöcke
    auskommentieren.
   </p>
   <p class="para">
    <div class="informalexample">
     <div class="example-contents">
<div class="annotation-interactive phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /></span><span style="color: #FF8000">/*<br />   echo 'Dies ist ein Test'; /* Dieser Kommentar wird ein Problem verursachen. */<br /></span><span style="color: #007700">*/<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
     </div>

    </div>
   </p>
  </div><?php manual_footer($setup); ?>