Re: [PHP-DEV] Re: Summary of string conversion problem

2003-12-01 Thread Andi Gutmans
At 11:19 PM 12/1/2003 +0100, Michael Walter wrote: Christian Schneider wrote: >[...] c) $arr[$obj] would suddenly work according the __toString(). I remember this being requested as a feature anyway ;-) The feature request was about using objects as hash indices, not their string representation (I

Re: [PHP-DEV] Re: Summary of string conversion problem

2003-12-01 Thread Michael Walter
Christian Schneider wrote: >[...] c) $arr[$obj] would suddenly work according the __toString(). I remember this being requested as a feature anyway ;-) The feature request was about using objects as hash indices, not their string representation (IIRC). Cheers, Michael -- PHP Internals - PHP Ru

Re: [PHP-DEV] Re: Summary of string conversion problem

2003-12-01 Thread Eduardo R. Maciel
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 (st

[PHP-DEV] Re: Summary of string conversion problem

2003-12-01 Thread Christian Schneider
I'm not really sure on what's the best way to handle the string conversion problem, as I haven't worked with SimpleXML yet. Andi's examples on the other hand aren't convincing enough for me so here my comments: Andi Gutmans wrote: a) include $obj; will not error out but convert the object to a