|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-05-31 13:07 UTC] johannes@php.net
[2007-06-01 08:33 UTC] nikolai dot essel at maxworx dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Dec 09 00:00:02 2025 UTC |
Description: ------------ After updating from PHP 5.1.6 some scripts didn?t work. Problem is the standard behavior from casting objects into strings without an explicit defined __toString() method Reproduce code: --------------- <?php class test { private $var = "test"; public function __construct() {} } $object = new test(); echo $object; ?> Expected result: ---------------- Object id #1 Actual result: -------------- Catchable fatal error: Object of class test could not be converted to string in C:\xampp\htdocs\classtest.php on line 9