Re: __toString() with cast is broken in php5 RC1
| From: | Adam Maccabee Trachtenberg | Date: | Fri, 02 Apr 2004 15:16:55 +0000 |
| Subject: | Re: __toString() with cast is broken in php5 RC1 | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-8894@lists.php.net to get a copy of this message | ||
On Fri, 2 Apr 2004, Derick Rethans wrote:
> *casting* works fine, we just don't do it automagically:
>
> print (string) $obj;
Not anymore:
class foo {
function __toString() {
return "I am a string.";
}
}
$foo = new foo;
print (string) $foo;
Object id #1
-adam
--
adam@trachtenberg.com
author of o'reilly's php cookbook
avoid the holiday rush, buy your copy today!