summaryrefslogtreecommitdiff
path: root/Zend/tests/bug60909_2.phpt
blob: 9660a9653fa57859465707a4bf9160a4a5cb00bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
--TEST--
Bug #60909 (custom error handler throwing Exception + fatal error = no shutdown function).
--FILE--
<?php
register_shutdown_function(function(){echo("\n\n!!!shutdown!!!\n\n");});

class Bad {
    public function __toString() {
        throw new Exception('I CAN DO THIS');
    }
}

$bad = new Bad();
echo "$bad";
--EXPECTF--
Fatal error: Uncaught Exception: I CAN DO THIS in %s:%d
Stack trace:
#0 %s(%d): Bad->__toString()
#1 {main}
  thrown in %s on line %d


!!!shutdown!!!