Monday, December 15, 2003, 1:28:41 PM, you wrote: > Guys,
> We have had this discussion before. There are two extremes to this issue. > The first is to always require the explicit __toString() call and the > second is to never require it and have all places in PHP whether it's > str_replace(), (string)$obj, $arr[$obj] to automatically convert to string. > The latter is problematic because it propagates to far too many places and > causes too much magic in my opinion. > I think the right trade off is to automatically convert it with "print" and > with concatenation. All the rest will require explicit calling. > It might not be your dream but it's a realistic approach. helly Mon Dec 15 11:59:21 2003 EDT Modified files: /php-src/tests/classes tostring.phpt /ZendEngine2 zend.c zend_object_handlers.c zend_object_handlers.h Log: Reenable __tostring() magic for print,echo,concatenation,function naming... but not for other internal things. (...) Guys, please try php-cvs version and report any problems (or dislike) as soon as possible. regards marcus -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php