Re: toString() and Object #ID
| From: | Cristian Rodriguez | Date: | Fri, 29 Jun 2007 23:35:57 +0000 |
| Subject: | Re: toString() and Object #ID | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-30372@lists.php.net to get a copy of this message | ||
On 6/29/07, Lars Schultz <schultz@widescreen.ch> wrote:
Hi there I just tried to switch from 5.1 to 5.2.3 and got thrown off right away by: "Object of class MyObject could not be converted to string" I googled a bit and also read any Messages in the internals list but couldn't find a decisive answer as to wether this will stay this way or not. In the "PHP 5 Bug Summary Report" I found Bug # 40799 "change string conversion behaviour for objects not implementing __toString()" which is still open. I don't want to complain or anything but I'd like to know wether it's feasible to wait for a change in this current, modified, behaviour or if it's going to stay this way.The old beahviuor was absolute non-sense..
always helpful). Is there any other way than casting an object to a string to get an objects #ID?use var_dump() or spl_object_hash for that.