Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Difference between PHP4 and PHP5

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 6.13k
    Comment on it

    PHP is a server side scripting language which is used to create dynamic web pages.

    PHP5 ia an updated version of PHP. PHP4 is no longer developed.

    There are some additional features in PHP5 due to which it is used widely.

    Some features are below:-

     

    S.NO FEATURES PHP4 PHP5
     1. Constructors and Destructors Constructor have same name as the class name Constructor's name as _construct and Destructor's name as _destruct()
     2. Object passing Objects are passed by value Objects are passed by reference
     3. Static methods and properties Static methods are not available. Access class by creating an instance of class Static methods are available. We can access class without creating an instance of class
     4. Abstract Do not support abstract class and methods Supports abstract class and methods
     5. Exception Don't have exception handling Introduces exception handling
     6. Final Class can not be declared as final Class or methods can be declared as final
     7. _autoload() This function is not available in this Classes and interfaces are automatically loaded bt _autoload()
     8. Magic Methods Magic methods are not available Introduces magic methods like _call, _get, _set and _tostring
     9. Extensions No new default extensions

    New default extensions:

    XML, DOM and XSL, PDO and Hash

     10. Memory Memory consumption is more Reduces consumption of memory
    11. OOP concept Less OOP concept in comparison with PHP5 Additional OOP concept like access specifier and inheritance

     

     

     

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: