summaryrefslogtreecommitdiff
path: root/Zend/tests/bug70967.phpt
blob: 03f3021e3999e82feb0a7d0a1cb11e8e3bb9cc7c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
--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: Uncaught Error: Call to undefined function undefined_function() in %s:%d
Stack trace:
#0 %s(%d): A->__toString()
#1 {main}
  thrown in %s on line %d