Re: __toString()
| From: | Adam Maccabee Trachtenberg | Date: | Sun, 14 Dec 2003 18:06:09 +0000 |
| Subject: | Re: __toString() | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-6452@lists.php.net to get a copy of this message | ||
On Sun, 14 Dec 2003, Sebastian Bergmann wrote:
> How is it supported by "print" when
>
> print $defect->thrownException()
>
> does not work but the object returned from thrownException() has a
> __toString() method?
That's part of my problem with __toString, there's a difference
between these two:
print $defect->thrownException();
print $defect->thrownException() . "\n";
I can't remember how things finally ended up, but originally the first
one worked while the second didn't. I advocated adding support for the
second, but Andi said there were technical problems.
Maybe we ended up also disabling the first because it was confusing.
-adam
--
adam@trachtenberg.com