Agreed.
Some new features:
Private and protected class variables. Something I look forward to, if only for the fact that it brings it closer to C++ style which I am more familiar.
Unified constructors. This I like a lot. It basically means that the contructor of any class has the same name, not just a function named after the class.
For instance:
old waynew wayPHP Code:class one
{
function one()
{
//this is the constructor
}
}
I like this because, as noted on php.net, it allows you to access the parent class' constructor without knowing what the parent class' name is. Obviously you will need to know what the parent class is, but if you want to use a different parent down the road you don't need to modify the code within the class, just the class definition.PHP Code:class one
{
function __construct()
{
//this is the constructor
}
}
I'm looking forward to other changes in PHP5 as well. I think it will be a big step forward for the language.
For more change info, click here




Reply With Quote