Exception::__toString() not called
| From: | Timm Friebe | Date: | Tue, 16 Mar 2004 21:22:24 +0000 |
| Subject: | Exception::__toString() not called | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-8544@lists.php.net to get a copy of this message | ||
Hi,
Both of the following examples used to output the
Exception::__toString() output, which they don't anymore:
$ php-dev -r '$e= new Exception(); echo $e, "\n";'
Object id #1
$ php-dev -r '$e= new Exception(); echo (string)$e, "\n";'
Object id #1
Works fine for userland objects:
$ php-dev -r 'class Foo { function __toString() { return "foo"; }} echo
new Foo(), "\n";'
foo
- Timm