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

-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to