Re: Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_API.c

From: Date: Mon, 01 Dec 2003 13:03:09 +0000
Subject: Re: Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_API.c
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-5867@lists.php.net to get a copy of this message
WF>> I'm talking about (string)$obj calling the cast handler in overloaded WF>> objects; COM does not have a __toString() method, and we shouldn't WF>> be cluttering up the "method-space" for overloaded objects - what WF>> if the underlying object has a __toString() method? If it does, it would be good to use it to convert it to string. It actually could be good if Java objects would use standard Java toString method to convert them to string. WF>> I'm not particularly worried about __toString() for regular WF>> user-defined objects, but for overloaded objects, we need that WF>> (string) cast stuff to work so that people can serialize() WF>> things like variant dates, integer values etc. Just a moment here. You imply that serialize() would use the same conversion to string that print, etc.? But that's obviously wrong - no object of PHP does this. Serialized object is one and string representation is something very different. -- Stanislav Malyshev, Zend Products Engineer stas@zend.com http://www.zend.com/ +972-3-6139665 ext.109

« previous php.internals (#5867) next »