Now: Tutorial for Web and Software Design > PHP > QA > PHP Content
> PHPFAQ - What do I have to do to convert PHP3 pages to PHP4 pages? Are there any compatibility problems? [Bookmark it]
PHPFAQ - What do I have to do to convert PHP3 pages to PHP4 pages? Are there any compatibility problems?


Question :

What do I have to do to convert PHP3 pages to PHP4 pages? Are there any compatibility problems?

Answer :Onthewholetherearenomajorproblems.PHP3scriptsshouldworkjustfine. However:
The mysql_insert_id() command must be used properly in 4 but if you were to pass a $mysql_result to mysql_insert_id like this:

<?
$the_id=mysql_insert_id($mysql_result);
?>

you will recieve an error in PHP4 but not in PHP3.

String concatenation in initialization of variables in class definitions is possible in PHP3, but not in PHP4:
PHP3SYNTAX:

<?
class foo 
{
var $bar = "A lot of text that I'd rather ".
"put on multiple lines using the string concatenator
('.')";
}
?>


PHP4SYNTAX:

<?
class foo 
{
var $bar = "A lot of text that I'd rather put on mulitiple lines but have to keep on a single line 'cause I'm using PHP4 - which by the way is a pretty nice tool";
}
?>



[Bookmark][Print] [Close][To Top]
  • Prev Article-PHP:

  • Next Article-PHP:
  • Related Materias
    PHPFAQ - How google is you
    PHPFAQ - Are there any web
    PHPFAQ - How can I accept 
    PHPFAQ - How can I finance
    PHPFAQ - Where can I get P
    PHPFAQ - Where can I host 
    PHPFAQ - Where can I find 
    PHPFAQ - I am trying to cr
    PHPFAQ - Is there a librar
    PHPFAQ - How can I manage 
    Topics
    Photoshop Tutorial
     

    Special Effect

      3D Effect
      Photoshop Articles
    Programming Tutorial
     

    C/C++ Tutorial

      Visual Basic
      C# Tutorial
    Database Tutorial
     

    MySQL Tutorial

      MS SQL Tutorial
      Oracle Tutorial
    Graphic Design Tutorial
     

    Coreldraw Tutorial

      Illustrator Tutorial
      3D Graphics Articles
    Webmaster Articles
     

    Domain Service

      Web Hosting
      Site Promotion
    Java Tutorial&Articles
     

    Java Servlets

      JavaEE Tutorial
     

    JavaBeans Tutorial

    XML Tutorial&Articles
     

    XML Style Tutorial

      AJAX Tutorial
      XML Mobile
    Flash Tutorial&Articles
     

    Flash Video

      Action Script
      Flash Articles
    OS Tutorial&Articles
     

    Linux Tutorial

      Symbian Tutorial
      MacOS Tutorial