IMHO, think that __toString should be explicitly
called as in java. Sure it would be great if it works
when using print, echo, etc, mean that cases when its
obvious that should evaluate to string. But ALL other
cases should be evaluated only explicitly. Maybe using
a diferent syntax for that as (string)$obj or (s)$obj
or $obj{}

And the best example is the one Andi wrote:

> > c) $arr[$obj] would suddenly work according the
> __toString().
> I remember this being requested as a feature anyway
> ;-)

I think this is a big problem. How would we retrieve
the object from an array when that object has defined
a __toString() method?

Specifying casting ??? like $arr[(obj)$obj] ???
$arr[(str)$obj] ????

I think it wasn´t the PHP pourpose, but wouldn´t be
bad....


__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to