There are several differences between PHP4 and PHP5:
- Unified constructor and Destructor.
- Exception has been introduced.
- New error level named E_STRICT has been introduced.
- Now we can define full method definitions for a abstract class.
- Within a class we can define class constants.
- We can use the final keyword to indicate that a method cannot be overridden by a child.
- Public, private and protected method introduced.
- Magic methods has been included.
- We can pass value by reference
- PHP4 uses Zend engine 1.0 as a parser.PHP5 uses Zend engine 2.0