ID: 30581 Updated by: [EMAIL PROTECTED] Reported By: kievman at ukrpost dot net -Status: Open +Status: Bogus Bug Type: Strings related Operating System: Win2k server PHP Version: 5.0.1 New Comment:
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php . Previous Comments: ------------------------------------------------------------------------ [2004-10-27 14:13:46] kievman at ukrpost dot net Description: ------------ Converting of object to string does not work properly. The code below explains all. Reproduce code: --------------- <?php class Foo { function __toString() { return "What ever"; } } $obj = new Foo; $str = (string) $obj; // call __toString() echo $obj; // call __toString(), prints "What ever", it's good print $str; // prints "Object id #1" it's not good ?> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=30581&edit=1