- More layout things

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@131310 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Derick Rethans 2003-06-13 11:05:30 +00:00
parent 0fc913567d
commit 60c75aa34c

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.33 $ -->
<!-- $Revision: 1.34 $ -->
<chapter id="language.basic-syntax">
<title>Basic syntax</title>
@ -124,15 +124,17 @@
</note>
</para>
<note>
<para>
Using short tags should be avoided when developing applications
or libraries that are meant for redistribution, or deployment on
PHP servers which are not under your control, because short tags
may not be supported on the target server. For portable,
redistributable code, be sure not to use short tags.
</para>
</note>
<para>
<note>
<para>
Using short tags should be avoided when developing applications
or libraries that are meant for redistribution, or deployment on
PHP servers which are not under your control, because short tags
may not be supported on the target server. For portable,
redistributable code, be sure not to use short tags.
</para>
</note>
</para>
<para>
The closing tag for the block will include the immediately
@ -141,7 +143,7 @@
semicolon terminating the last line of a PHP block.
</para>
<para>
<para>
PHP allows you to use structures like this:
<example><title>Advanced escaping</title>
<programlisting role="php">
@ -175,7 +177,8 @@ if ($expression) {
<simpara>
Instructions are separated the same as in C or Perl - terminate
each statement with a semicolon.</simpara>
each statement with a semicolon.
</simpara>
<para>
The closing tag (?&gt;) also implies the end of the statement, so
@ -221,22 +224,25 @@ if ($expression) {
the line or the current block of PHP code, whichever comes
first.
</simpara>
<informalexample>
<programlisting role="php">
<para>
<informalexample>
<programlisting role="php">
<![CDATA[
<h1>This is an <?php # echo "simple";?> example.</h1>
<p>The header above will say 'This is an example'.
]]>
</programlisting>
</informalexample>
</programlisting>
</informalexample>
</para>
<simpara>
You should be careful not to nest 'C' style comments, which can
happen when commenting out large blocks.
</simpara>
<informalexample>
<programlisting role="php">
<para>
<informalexample>
<programlisting role="php">
<![CDATA[
<?php
/*
@ -244,14 +250,16 @@ if ($expression) {
*/
?>
]]>
</programlisting>
</informalexample>
</programlisting>
</informalexample>
</para>
<simpara>
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 // ?> WILL be printed: ?> skips out of
the PHP mode and returns to HTML mode, and // cannot influence that.
This means that HTML code after <literal>// ?></literal> WILL be printed:
?> skips out of the PHP mode and returns to HTML mode, and
<literal>//</literal> cannot influence that.
</simpara>
</sect1>
</chapter>