Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:6453 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 84827 invoked by uid 1010); 15 Dec 2003 01:35:16 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 84803 invoked from network); 15 Dec 2003 01:35:16 -0000 Received: from unknown (HELO blacksheep.csh.rit.edu) (129.21.60.6) by pb1.pair.com with SMTP; 15 Dec 2003 01:35:16 -0000 Received: from fury.csh.rit.edu (fury.csh.rit.edu [IPv6:2001:470:1f00:135:a00:20ff:fe8d:5399]) by blacksheep.csh.rit.edu (Postfix) with ESMTP id BDD99266 for ; Sun, 14 Dec 2003 20:35:15 -0500 (EST) Received: by fury.csh.rit.edu (Postfix, from userid 37404) id 6D405137A; Sun, 14 Dec 2003 20:35:15 -0500 (EST) Date: Sun, 14 Dec 2003 20:35:14 -0500 To: internals@lists.php.net Message-ID: <20031215013514.GB29665@csh.rit.edu> Mail-Followup-To: internals@lists.php.net References: <5.1.0.14.2.20031214151626.022a8760@127.0.0.1> <20031214144148.A4A59247@blacksheep.csh.rit.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20031214144148.A4A59247@blacksheep.csh.rit.edu> Subject: Re: [PHP-DEV] __toString() From: jon@php.net (Jon Parise) On Sun, Dec 14, 2003 at 03:41:10PM +0100, Sebastian Bergmann wrote: > > It is supported by "print" and for internal extensions such as > > SimpleXML which require this. > > How is it supported by "print" when > > print $defect->thrownException() > > does not work but the object returned from thrownException() has a > __toString() method? Hopefully, this still works (don't have a recent PHP5 build to try): print (string)$defect->thrownException(); The explicit cast also addresses this case: print (string)$defect->thrownException() . "\n"; -- Jon Parise (jon@php.net) :: The PHP Project (http://www.php.net/)