Re: __toString() with strval() and settype()
| From: | Sterling Hughes | Date: | Fri, 16 Jan 2004 23:06:03 +0000 |
| Subject: | Re: __toString() with strval() and settype() | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-7142@lists.php.net to get a copy of this message | ||
> Adam Maccabee Trachtenberg wrote:
> >Anyone else care to chime in here? If we're really moving to RC1, I
>
> So to summarize that'd be
> echo, print, (string), strval() and settype()
> using __toString(), right? Sounds +1 to me.
>
settype() is a tricky one - i think it should fail for objects, as it
could cause destruction of the underlying object, as we don't have
magic (in the perl internals meaning of the world).
-sterling
--
"Reductionists like to take things apart. The rest of us are
just trying to get it together."
- Larry Wall, Programming Perl, 3rd Edition