Any chance this could be done in the form of an interface, instead of a
magic function?
Evert
Dmitry Stogov wrote:
We probably should support this, but not only for __toString().
Objects may also have internal get() (not __get()) and cast() handlers that
should be supported too.
Also usage of cast() in context of array offset don't say what do we like
"int" or "string".
Thanks. Dmitry.
-----Original Message-----
From: Marcus Boerger [mailto:[EMAIL PROTECTED]
Sent: Saturday, June 03, 2006 3:42 PM
To: internals@lists.php.net
Cc: Dmitry Stogov; Andi Gutmans; Zeev Suraski; Ilia Alshanetsky
Subject: [PHP-DEV] Missing __toString() part
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.
--
Best regards,
Marcus mailto:[EMAIL PROTECTED]
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php