Neden) (toString __ den istisna imkansız?
class a
{
public function __toString()
{
throw new Exception();
}
}
$a = new a();
echo $a;
Yukarıdaki kod bu üretir:
Fatal error: Method a::__toString() must not throw an exception in /var/www/localhost/htdocs/index.php on line 12
I http://php.net/manual/en/migration52.incompatible.php Bu davranış tarif edildiği yerde işaret, ama neden oldu? Bunu yapmak için herhangi bir neden?
Burada herkes bunu biliyor olabilir?
http://bugs.php.net/50699: Her zamanki gibi bug tracker php-dev-ekip manuel görmek ama bir şey diyor