The PHP 5 has been released with an AIM to attract object oriented developers . 

For this the PHP Developing Team has totally redesigned the PHP's Design model 
from Procedure Oriented Model to Object Oriented Model.

The PHP 5 has some unique features that have been listed in the points given 
below .

1 . PHP 5 intoduces new database named as SQLite which is a light weight 
database having speed performance double that of mysql . PHP 5 has inbuilt 
support for SQLite . So u dont need to install a database seperately if u need 
some DB tool to start tasting PHP 5's backend features .

2 . PHP 5 has an Object with private , public , protected Members as against 
public members in older PHP versions . Private members can be accessed by same 
class only , public can be accessed by any one outside the object as well as 
inside object , proctected members can be accessed by the subclasses of the 
given class.
    Subclass are the one which are derived from some class, we use to call it 
as child class.

3 . Constructors and Destructors have enhanced in PHP 5 . Now u can declare a 
constructor of a class by writing __construct() and __destruct() . 
    The advantage of doing this is that u dont have to rename the constructor 
and destructor when u rename the class . Also u dont need to change any code in 
the derived subclasses of the given class when u rename it.

4 . Abstract class : The classes which cannot be used directly for creating 
objects are called as abstract class  . These classes are used by other classes 
as parent class.
    These classes are declared by prefixing the class with keyword 'abstract'.
    In the same way we can have abstract functions in a class .

5 . interface : interface are built for collection of some method or data 
members name that the classes inheriting the interface should necessarily 
contain.

6 . In PHP5 overloading has been made possible , i dont know if it was 
supported in PHP4 (anybody from group should check it out). U use a __call 
function to call any function .

7 . The final keyword is used to declare a variable of function of a class so 
that it cannot be over-ridden in the subclasses.

8 . PHP5 supports dereferencing , this means u can use a short hand to access 
methods of an object thru 2nd object which on its part is referenced thru 3rd 
object and so on and  on .
 eg : writing in PHP4 ,
  $mailObj = ClassName::methodName();
  $message = $mailObj->getMessage();
 in PHP5 can be written as ,
  $message = ClassName::methodName()->getMessage();

9 . Autloading - This refers to using a class out of a set of classes only when 
u r intializing an object of that class.This saves the interpretation time of 
PHP parser as it does not have to parse all the kachra-code that is of no use 
in current context or webpage .This is done by referencing to a class through 
the __autoload() function . So the __autoload function would get called only 
when the class declared within it is used in the current page.



Ravi Pandey (Do it my way)


([EMAIL PROTECTED])

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

[Non-text portions of this message have been removed]



Community email addresses:
  Post message: [email protected]
  Subscribe:    [EMAIL PROTECTED]
  Unsubscribe:  [EMAIL PROTECTED]
  List owner:   [EMAIL PROTECTED]

Shortcut URL to this page:
  http://groups.yahoo.com/group/php-list 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php-list/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to