rasmus Sun Nov 6 13:00:36 2005 EDT
Modified files:
/phpdoc/en/language basic-syntax.xml
Log:
Make it explicit that this applies to both // and #
http://cvs.php.net/diff.php/phpdoc/en/language/basic-syntax.xml?r1=1.48&r2=1.49&ty=u
Index: phpdoc/en/language/basic-syntax.xml
diff -u phpdoc/en/language/basic-syntax.xml:1.48
phpdoc/en/language/basic-syntax.xml:1.49
--- phpdoc/en/language/basic-syntax.xml:1.48 Sat Nov 5 03:08:34 2005
+++ phpdoc/en/language/basic-syntax.xml Sun Nov 6 13:00:32 2005
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.48 $ -->
+<!-- $Revision: 1.49 $ -->
<chapter id="language.basic-syntax">
<title>Basic syntax</title>
<sect1 id="language.basic-syntax.phpmode">
@@ -176,20 +176,22 @@
/* This is a multi line comment
yet another line of comment */
echo 'This is yet another test';
- echo 'One Final Test'; # This is a shell-style comment
+ echo 'One Final Test'; # This is a one-line shell-style comment
?>
]]>
</programlisting>
</informalexample>
</para>
<simpara>
- The "one-line" comment styles only comments to the end of
+ The "one-line" comment styles only comment to the end of
the line or the current block of PHP code, whichever comes first.
- This means that HTML code after <literal>// ?></literal> WILL be
printed:
+ This means that HTML code after <literal>// ... ?></literal>
+ or <literal># ... ?></literal> WILL be printed:
?> breaks out of PHP mode and returns to HTML mode, and
- <literal>//</literal> cannot influence that.
+ <literal>//</literal> or <literal>#</literal> cannot influence that.
If the <link linkend="ini.asp-tags">asp_tags</link> configuration directive
- is enabled, it behaves the same with <literal>// %></literal>.
+ is enabled, it behaves the same with <literal>// %></literal> and
+ <literal># %></literal>.
However, the <literal></script></literal> tag doesn't break out of
PHP mode in
a one-line comment.
</simpara>
@@ -198,7 +200,7 @@
<programlisting role="php">
<![CDATA[
<h1>This is an <?php # echo 'simple';?> example.</h1>
-<p>The header above will say 'This is an example'.</p>
+<p>The header above will say 'This is an example'.</p>
]]>
</programlisting>
</informalexample>