Hello Cristiano, Here's why i think that interface is not good solution.
We need the toString method like java's one to safely assume that _every_ object has the string representation. This means we can say $obj1->toString() and $obj2->toString() and don't care if $obj1 and $obj2 do support this method. In fact we _already_ have this functionality in ( string )$obj cast -- it's applicable to any object, doesn't it?. All we need is to formalize this cast in OOP manner. Interface is only the way to describe what class can do. If every class can provide it's string representation why should you implement some interface? It's only my $.20 though. -- Best regards, Simeon mailto:[EMAIL PROTECTED] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
