mirror of
https://github.com/php/php-src.git
synced 2024-11-24 10:24:11 +08:00
15 lines
351 B
PHP
15 lines
351 B
PHP
--TEST--
|
|
Bug #70967 (Weird error handling for __toString when Error is thrown)
|
|
--FILE--
|
|
<?php
|
|
class A {
|
|
public function __toString() {
|
|
undefined_function();
|
|
}
|
|
}
|
|
|
|
echo (new A);
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Method A::__toString() must not throw an exception, caught Error: Call to undefined function undefined_function() in %sbug70967.php on line %d
|