1--TEST-- 2Bug #70967 (Weird error handling for __toString when Error is thrown) 3--FILE-- 4<?php 5class A { 6 public function __toString() { 7 undefined_function(); 8 } 9} 10 11echo (new A); 12?> 13--EXPECTF-- 14Fatal error: Method A::__toString() must not throw an exception, caught Error: Call to undefined function undefined_function() in %sbug70967.php on line %d 15