Re: Quick Poll: PHP 4 / 5

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I've changed to PHP5 and not experienced any problems with old code. In
fact, the differences and incompatibilities are very minor and most
projects should work without any changes.

PHP5 features the new Zend Engine 2. It's not yet really faster than the
one in PHP4 but has large potential. Without going into further details:
It's better, especially if one wants to go with objects and classes.

PHP5 features SQLite. Of course you can install the PECL module and use
SQLite with PHP4 but some features like the iterators aren't available
in PHP4. As an example:

$db=new SQLiteDatabase('mydb.db');
foreach (
    $db->query('SELECT * FROM adresses WHERE city="Sin City"')
    as $adress)
{
    echo $adress['name'];
}

That's simpler than in any PHP4/MySQL implementation. SQLite stores the
database in a single file, there's no need for a server (like with
MySQL). This makes it ideal for small quick and dirty projects or
machines with old CPU and s small amount of RAM.

Furthermore, PHP5.1 will introduce PDO which unifies this database
interface for all db systems. It's a native database abstraction layer.

You see, even if you don't want to use the OOP features like classes,
interfaces and iterators you can still benefit from them in the standard
modules.


AllOlli
____________
Coffee anyone? :-Q

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux