Sophie

Sophie

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

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

<HTML
><HEAD
><TITLE
>Other incompatibilities</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="Function TRUE/FALSE return values"
HREF="migration.truefalse.html"><LINK
REL="NEXT"
TITLE="Debugging PHP"
HREF="debugger.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.truefalse.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="debugger.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="section"
><H1
CLASS="section"
><A
NAME="migration.other"
></A
>Other incompatibilities</H1
><P
></P
><UL
><LI
><P
>&#13;    The PHP 3.0 Apache module no longer supports Apache versions
    prior to 1.2.  Apache 1.2 or later is required.
   </P
></LI
><LI
><P
>&#13;    <A
HREF="function.echo.html"
><B
CLASS="function"
>echo()</B
></A
> no longer supports a format string.
    Use the <A
HREF="function.printf.html"
><B
CLASS="function"
>printf()</B
></A
> function instead.
   </P
></LI
><LI
><P
>&#13;    In PHP/FI 2.0, an implementation side-effect caused
    <TT
CLASS="literal"
>$foo[0]</TT
> to have the same effect as
    <TT
CLASS="literal"
>$foo</TT
>. This is not true for PHP 3.0.
   </P
></LI
><LI
><P
>&#13;     Reading arrays with <TT
CLASS="literal"
>$array[]</TT
> is no longer
     supported
    </P
><P
>&#13;     That is, you cannot traverse an array by having a loop that does
     <TT
CLASS="literal"
>$data = $array[]</TT
>.  Use <A
HREF="function.current.html"
><B
CLASS="function"
>current()</B
></A
>
     and <A
HREF="function.next.html"
><B
CLASS="function"
>next()</B
></A
> instead.
    </P
><P
>&#13;     Also, <TT
CLASS="literal"
>$array1[] = $array2</TT
> does not
     append the values of <TT
CLASS="literal"
>$array2</TT
> to
     <TT
CLASS="literal"
>$array1</TT
>, but appends
     <TT
CLASS="literal"
>$array2</TT
> as the last entry of
     <TT
CLASS="literal"
>$array1</TT
>. See also multidimensional array
     support.
    </P
></LI
><LI
><P
>&#13;     <TT
CLASS="literal"
>"+"</TT
> is no longer overloaded as a
     concatenation operator for strings, instead it converts it's
     arguments to numbers and performs numeric addition. Use
     <TT
CLASS="literal"
>"."</TT
> instead.
    </P
></LI
></UL
><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
CLASS="EXAMPLE"
><TR
><TD
><DIV
CLASS="example"
><A
NAME="AEN104331"
></A
><P
><B
>Example C-11. Migration from 2.0: concatenation for strings</B
></P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
CELLPADDING="5"
><TR
><TD
><PRE
CLASS="php"
>echo "1" + "1";</PRE
></TD
></TR
></TABLE
><P
> 
    In PHP 2.0 this would echo 11, in PHP 3.0 it would
    echo 2. Instead use:
    <TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
CELLPADDING="5"
><TR
><TD
><PRE
CLASS="php"
>echo "1"."1";</PRE
></TD
></TR
></TABLE
>
    <TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
CELLPADDING="5"
><TR
><TD
><PRE
CLASS="php"
>$a = 1;
$b = 1;
echo $a + $b;</PRE
></TD
></TR
></TABLE
>
   </P
><P
>&#13;    This would echo 2 in both PHP 2.0 and 3.0.
    <TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
CELLPADDING="5"
><TR
><TD
><PRE
CLASS="php"
>$a = 1;
$b = 1;
echo $a.$b;</PRE
></TD
></TR
></TABLE
>
    This will echo 11 in PHP 3.0.
   </P
></DIV
></TD
></TR
></TABLE
></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.truefalse.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="debugger.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Function <TT
CLASS="constant"
><B
>TRUE</B
></TT
>/<TT
CLASS="constant"
><B
>FALSE</B
></TT
> return values</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="migration.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Debugging PHP</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>