xref: /PHP-7.4/Zend/tests/bug70967.phpt (revision a31f4642)
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: Uncaught Error: Call to undefined function undefined_function() in %s:%d
15Stack trace:
16#0 %s(%d): A->__toString()
17#1 {main}
18  thrown in %s on line %d
19