Difference Between PHP4 & PHP 5
April 12th, 2010
Difference Between PHP4 & PHP 5
1. Soap, MySQLi and Sqlite extension introduced in php5
2. Exception handling has been introduced in PHP5 (i.e. try and catch statements)
3. Objects can iterate through foreach in PHP5
$object = new IteratorTest();
foreach ($object as $value) {
print $value;
}
4. Added public/private/protected access modifiers in PHP5
5. Introduced Unified constructor name __construct() in PHP5
6. Object destructor support by defining a __destructor() method in PHP5
7. Introduced abstract classes & methods
Good article to go through:
http://devzone.zend.com/article/1714













