Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:7143 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 82699 invoked by uid 1010); 16 Jan 2004 23:14:41 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 82661 invoked from network); 16 Jan 2004 23:14:40 -0000 Received: from unknown (HELO miranda.org) (209.58.150.153) by pb1.pair.com with SMTP; 16 Jan 2004 23:14:40 -0000 Received: (qmail 22302 invoked by uid 546); 16 Jan 2004 23:14:37 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 16 Jan 2004 23:14:37 -0000 Date: Fri, 16 Jan 2004 18:14:37 -0500 (EST) X-X-Sender: adam@miranda.org To: Sterling Hughes cc: Christian Schneider , internals@lists.php.net In-Reply-To: <20040116230603.GJ2127@bumblebury.com> Message-ID: References: <132109560218.20040115204833@marcus-boerger.de> <40086DD5.3060106@cschneid.com> <20040116230603.GJ2127@bumblebury.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: [PHP-DEV] __toString() with strval() and settype() From: adam@trachtenberg.com (Adam Maccabee Trachtenberg) On Fri, 16 Jan 2004, Sterling Hughes wrote: > > Adam Maccabee Trachtenberg wrote: > > >Anyone else care to chime in here? If we're really moving to RC1, I > > > > So to summarize that'd be > > echo, print, (string), strval() and settype() > > using __toString(), right? Sounds +1 to me. > > > > settype() is a tricky one - i think it should fail for objects, as it > could cause destruction of the underlying object, as we don't have > magic (in the perl internals meaning of the world). Ah right. settype() modifies the original object instead of returning a cast version of the object. Yea, settype() should probably fail for objects. So, it's: echo, print, (string), strval(), "$obj", and printf("%s", $obj) (plus printf() variants). That's my complete list. AFAIK, everything but strval() works right now. We just need to fix that function. Also, I don't know why exit() would call __toString(). That doesn't make sense to me. -adam -- adam@trachtenberg.com author of o'reilly's php cookbook avoid the holiday rush, buy your copy today!