Re: Missing __toString() part
| From: | Robert Amos | Date: | Sat, 03 Jun 2006 12:55:00 +0000 |
| Subject: | Re: Missing __toString() part | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-23880@lists.php.net to get a copy of this message | ||
Hi,
Is it really worth enabling a whole new area where problems could
occur just for this? Can you provide an example of where it might
actually be considered useful and not just being lazy?
-Rob
On 6/3/06, Marcus Boerger <helly@php.net> wrote:
Hello Pierre, ever thought that we use tests to check special behavior and that those snippets have little to do with real applications? Obviously not. The idea behind is that for instance you might use an array as a translation and use an object to *calculate* the index. Saturday, June 3, 2006, 2:40:29 PM, you wrote: Hi, On 6/3/06, Marcus Boerger <mail@marcus-boerger.de> wrote:-- Xnyo - http://xnyo.odynia.org/$arr[new Test] = 'abc'; makes very little sense to me, as well as $a = new Test; $arr[$a] = 'abc'; Do we really want to support that? --Pierre Best regards, Marcus -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.phpHello 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.