Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:6445 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 79729 invoked by uid 1010); 14 Dec 2003 13:17:16 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 79685 invoked from network); 14 Dec 2003 13:17:15 -0000 Received: from unknown (HELO mail.zend.com) (192.117.235.230) by pb1.pair.com with SMTP; 14 Dec 2003 13:17:15 -0000 Received: (qmail 15462 invoked from network); 14 Dec 2003 13:17:09 -0000 Received: from guardian.zend.office (HELO andi-laptop.zend.com) (10.1.1.4) by mail.zend.com with SMTP; 14 Dec 2003 13:17:09 -0000 Message-ID: <5.1.0.14.2.20031214151626.022a8760@127.0.0.1> X-Sender: andi@127.0.0.1 X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Sun, 14 Dec 2003 15:17:06 +0200 To: Sebastian Bergmann ,internals@lists.php.net Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: Re: [PHP-DEV] __toString() From: andi@zend.com (Andi Gutmans) It is supported by "print" and for internal extensions such as SimpleXML which require this. Also in Java toString() isn't called automagically in every place so I wouldn't call it useless. Andi At 08:56 AM 12/14/2003 +0100, Sebastian Bergmann wrote: > The following code from PHPUnit stopped working after the recent changes > to __toString() > > protected function printDefectTrace(PHPUnit_Framework_TestFailure > $defect) { > print $defect->thrownException() . "\n"; > > print PHPUnit_Runner_BaseTestRunner::getFilteredStack( > $defect->thrownException() > ); > } > > The > > print $defect->thrownException() . "\n"; > > line worked fine before and printed the result of > > $defect->thrownException()->__toString() > > Is this the intended behaviour? > >-- >Sebastian Bergmann >http://sebastian-bergmann.de/ http://phpOpenTracker.de/ > >Das Buch zu PHP 5: http://professionelle-softwareentwicklung-mit-php5.de/ > >-- >PHP Internals - PHP Runtime Development Mailing List >To unsubscribe, visit: http://www.php.net/unsub.php