PHP4 and PHP5

PHP4 and PHP5

Introductions –

First starts with PHP4 features. PHP4 started up with object-oriented concepts like as c++. PHP4 got almost all the OOPs features. With little difference in functionality…


Below are PHP4 added features –


  1. class

  2. extends

  3. Constructors

  4. Scope Resolution Operator (::)

  5. parent

  6. Serializing objects – objects in sessions

  7. The magic functions __sleep and __wakeup

  8. References inside the constructor

  9. Comparing objects


PHP 5 now came up with new Object Model. Even php4 contains the object model functionalities but PHP5 handling of objects has been completely rewritten, allowing for better performance and more features.

Features Of PHP5 –

  1. Constructors and Destructor

  2. Visibility

  3. Scope Resolution Operator (::)

  4. Static Keyword

  5. Class Constants

  6. Class Abstraction

  7. Object Interfaces

  8. Overloading

  9. Object Iteration

  10. Patterns

  11. Magic Methods

  12. Final Keyword

  13. Object cloning

  14. Comparing objects

  15. Reflection

  16. Type Hinting

  17. Late Static Binding


Some of the above features are in PHP4. But still PHP5 has got improved functionalities on above features. Some of the syntaxes are changed.

Thank you,

Santhosh Tirunahari

Similar Posts:

Leave a Reply

Your email address will not be published.