Re: Re: Missing __toString() part
| From: | Derick Rethans | Date: | Sun, 04 Jun 2006 11:56:19 +0000 |
| Subject: | Re: Re: Missing __toString() part | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-23919@lists.php.net to get a copy of this message | ||
On Sun, 4 Jun 2006, Michael Wallner wrote:
> Marcus Boerger wrote:
> > Hello guys,
> >
> > the attached patch closes one more __toString() part. It allows
> > to use objects that define __toString as indexes to arrays. What do
> > you guys think about this, should we add it or stay with the old
> > behavior that didn't allow objects as indexes at all.
>
> -1 on automatic __toString()
> +1 on explicit (string) cast (as it is now)
> +0 on __toHash()/__toKey() (which must be implemented explicitly)
I changed my mind :)
-1 on automatic __toString()
+1 on explicit (string) cast
-1 on __toHash/__toKey
+1 on unique object identifiers
regards,
Derick