Sophie

Sophie

distrib > PLD > ac > amd64 > media > dist > by-pkgid > dd8ef74e7a184506d40e4328053fb785 > files > 3695

php-manual-ro-20051028-1.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML
><HEAD
><TITLE
>Comments</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="Manual PHP"
HREF="index.html"><LINK
REL="UP"
TITLE="Basic syntax"
HREF="language.basic-syntax.html"><LINK
REL="PREVIOUS"
TITLE="Instruction separation"
HREF="language.basic-syntax.instruction-separation.html"><LINK
REL="NEXT"
TITLE="Types"
HREF="language.types.html"><META
HTTP-EQUIV="Content-type"
CONTENT="text/html; charset=ISO-8859-2"></HEAD
><BODY
CLASS="sect1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Manual PHP</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="language.basic-syntax.instruction-separation.html"
ACCESSKEY="P"
>Înapoi</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Cap. 5. Basic syntax</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="language.types.html"
ACCESSKEY="N"
>Înainte</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="sect1"
><H1
CLASS="sect1"
><A
NAME="language.basic-syntax.comments"
>Comments</A
></H1
><P
>&#13;    PHP supports 'C', 'C++' and Unix shell-style comments. For example:

    <DIV
CLASS="informalexample"
><P
></P
><A
NAME="AEN562"
></A
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
CELLPADDING="5"
><TR
><TD
><code><font color="#000000">
<font color="#0000BB">&lt;?php<br />&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#007700">echo </font><font color="#DD0000">"This is a test"</font><font color="#007700">; </font><font color="#FF8000">// This is a one-line c++ style comment<br />&nbsp;&nbsp;&nbsp;&nbsp;/* This is a multi line comment<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;yet another line of comment */<br />&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#007700">echo </font><font color="#DD0000">"This is yet another test"</font><font color="#007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;echo </font><font color="#DD0000">"One Final Test"</font><font color="#007700">; </font><font color="#FF8000"># This is shell-style style comment<br /></font><font color="#0000BB">?&gt;</font>
</font>
</code></TD
></TR
></TABLE
><P
></P
></DIV
>
   </P
><P
>&#13;    The "one-line" comment styles actually only comment to the end of
    the line or the current block of PHP code, whichever comes
    first.
   </P
><P
>&#13;    <DIV
CLASS="informalexample"
><P
></P
><A
NAME="AEN566"
></A
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
CELLPADDING="5"
><TR
><TD
><code><font color="#000000">
&lt;h1&gt;This is an <font color="#0000BB">&lt;?php </font><font color="#FF8000"># echo "simple";</font><font color="#0000BB">?&gt;</font> example.&lt;/h1&gt;<br />&lt;p&gt;The header above will say 'This is an example'.</font>
</code></TD
></TR
></TABLE
><P
></P
></DIV
> 
   </P
><P
>&#13;    You should be careful not to nest 'C' style comments, which can
    happen when commenting out large blocks.
   </P
><P
>&#13;    <DIV
CLASS="informalexample"
><P
></P
><A
NAME="AEN570"
></A
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
CELLPADDING="5"
><TR
><TD
><code><font color="#000000">
<font color="#0000BB">&lt;?php<br /> </font><font color="#FF8000">/* <br />&nbsp;&nbsp;&nbsp;&nbsp;echo "This is a test"; /* This comment will cause a problem */<br /> </font><font color="#007700">*/<br /></font><font color="#0000BB">?&gt;</font>
</font>
</code></TD
></TR
></TABLE
><P
></P
></DIV
>
   </P
><P
>&#13;    The one-line comment styles actually only comment to the end
    of the line or the current block of PHP code, whichever comes first.
    This means that HTML code after <VAR
CLASS="literal"
>// ?&#62;</VAR
> WILL be printed:
    ?&#62; skips out of the PHP mode and returns to HTML mode, and
    <VAR
CLASS="literal"
>//</VAR
> cannot influence that.
    If <A
HREF="ini.sect.language-options.html#ini.asp-tags"
>asp_tags</A
> configuration directive
    is enabled, it behaves the same with <VAR
CLASS="literal"
>// %&#62;</VAR
>.
   </P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="language.basic-syntax.instruction-separation.html"
ACCESSKEY="P"
>Înapoi</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Acas&#227;</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="language.types.html"
ACCESSKEY="N"
>Înainte</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Instruction separation</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="language.basic-syntax.html"
ACCESSKEY="U"
>Sus</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Types</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>