# __toString()

- Thread: https://externals.io/message/6452
- Original archive: https://news-web.php.net/php.internals/6452
- Started by Adam Maccabee Trachtenberg on 2003-12-14T18:06:09+00:00
- Messages: 1
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #6452 — Adam Maccabee Trachtenberg — 2003-12-14T18:06:09+00:00

URL: https://externals.io/message/6452#6452

>   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
