Sophie

Sophie

distrib > Mandriva > 9.1 > ppc > media > main > by-pkgid > 0afeee9cca140e167a996902b9a677c5 > files > 3024

php-manual-en-4.3.0-2mdk.noarch.rpm

<HTML
><HEAD
><TITLE
>Start/end tags</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="PHP Manual"
HREF="index.html"><LINK
REL="UP"
TITLE="Migrating from PHP/FI 2 to PHP 3"
HREF="migration.html"><LINK
REL="PREVIOUS"
TITLE="Migrating from PHP/FI 2 to PHP 3"
HREF="migration.html"><LINK
REL="NEXT"
TITLE="if..endif syntax"
HREF="migration.if-endif.html"><META
HTTP-EQUIV="Content-type"
CONTENT="text/html; charset=ISO-8859-1"></HEAD
><BODY
CLASS="section"
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"
>PHP Manual</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="migration.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Appendix C. Migrating from PHP/FI 2 to PHP 3</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="migration.if-endif.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="section"
><H1
CLASS="section"
><A
NAME="migration.startendtags"
></A
>Start/end tags</H1
><P
>&#13;   The first thing you probably will notice is that PHP's start and end
   tags have changed.  The old <TT
CLASS="literal"
>&#60;? &#62;</TT
> form has been
   replaced by three new possible forms:
   <TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
CLASS="EXAMPLE"
><TR
><TD
><DIV
CLASS="example"
><A
NAME="AEN104228"
></A
><P
><B
>Example C-1. Migration: old start/end tags</B
></P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
CELLPADDING="5"
><TR
><TD
><PRE
CLASS="php"
>&#60;? echo "This is PHP/FI 2.0 code.\n"; ?&#62;</PRE
></TD
></TR
></TABLE
></DIV
></TD
></TR
></TABLE
>
   As of version 2.0, PHP/FI also supports this variation:
   <TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
CLASS="EXAMPLE"
><TR
><TD
><DIV
CLASS="example"
><A
NAME="AEN104231"
></A
><P
><B
>Example C-2. Migration: first new start/end tags</B
></P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
CELLPADDING="5"
><TR
><TD
><PRE
CLASS="php"
>&#60;? echo "This is PHP 3.0 code!\n"; ?&#62;</PRE
></TD
></TR
></TABLE
></DIV
></TD
></TR
></TABLE
>

   Notice that the end tag now consists of a question mark and a
   greater-than character instead of just greater-than.  However, if
   you plan on using XML on your server, you will get problems with
   the first new variant, because PHP may try to execute the XML
   markup in XML documents as PHP code.  Because of this, the
   following variation was introduced:

   <TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
CLASS="EXAMPLE"
><TR
><TD
><DIV
CLASS="example"
><A
NAME="AEN104234"
></A
><P
><B
>Example C-3. Migration: second new start/end tags</B
></P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
CELLPADDING="5"
><TR
><TD
><PRE
CLASS="php"
>&#60;?php echo "This is PHP 3.0 code!\n"; ?&#62;</PRE
></TD
></TR
></TABLE
></DIV
></TD
></TR
></TABLE
>

   Some people have had problems with editors that don't understand
   the processing instruction tags at all.  Microsoft FrontPage is one
   such editor, and as a workaround for these, the following variation
   was introduced as well:

   <TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
CLASS="EXAMPLE"
><TR
><TD
><DIV
CLASS="example"
><A
NAME="AEN104237"
></A
><P
><B
>Example C-4. Migration: third new start/end tags</B
></P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
CELLPADDING="5"
><TR
><TD
><PRE
CLASS="php"
>&#60;script language="php"&#62;

  echo "This is PHP 3.0 code!\n";

&#60;/script&#62;</PRE
></TD
></TR
></TABLE
></DIV
></TD
></TR
></TABLE
>
  </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="migration.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="migration.if-endif.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Migrating from PHP/FI 2 to PHP 3</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="migration.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>if..endif syntax</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>