Use of <?php should be the 1st one.

# I read the comment, but I just cannot stand for it :)


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@80044 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Yasuo Ohgaki 2002-04-26 13:03:12 +00:00
parent 879c26e249
commit e88f3d13fd

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.27 $ -->
<!-- $Revision: 1.28 $ -->
<chapter id="language.basic-syntax">
<title>Basic syntax</title>
@ -81,11 +81,11 @@
<title>Ways of escaping from HTML</title>
<programlisting role="php">
<![CDATA[
1. <? echo ("this is the simplest, an SGML processing instruction\n"); ?>
1. <?php echo("if you want to serve XHTML or XML documents, do like this\n"); ?>
2. <? echo ("this is the simplest, an SGML processing instruction\n"); ?>
<?= expression ?> This is a shortcut for "<? echo expression ?>"
2. <?php echo("if you want to serve XHTML or XML documents, do like this\n"); ?>
3. <script language="php">
echo ("some editors (like FrontPage) don't
like processing instructions");
@ -99,7 +99,13 @@
</para>
<para>
The first way is only available if short tags have been
The first way is the generally preferred method, as it
allows for the the use of PHP in XML-conformant code such as
XHTML.
</para>
<para>
The second way is only available if short tags have been
enabled. This can be done via the <function>short_tags</function>
function (PHP 3 only), by enabling the <link
linkend="ini.short-open-tag">short_open_tag</link> configuration
@ -107,12 +113,6 @@
--enable-short-tags option to <command>configure</command>.
</para>
<para>
Again, the second way is the generally preferred method, as it
allows for the the use of PHP in XML-conformant code such as
XHTML.
</para>
<para>
The fourth way is only available if ASP-style tags have been
enabled using the <link linkend="ini.asp-tags">asp_tags</link>