blob: e13d6da88467ee7a86bee72b4e114fe506772496 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
--TEST--
Bug #29368.2 (The destructor is called when an exception is thrown from the constructor).
--FILE--
<?php
class Bomb {
function foo() {
}
function __destruct() {
throw new Exception("bomb!");
}
}
try {
$x = new ReflectionMethod(new Bomb(), "foo");
} catch (Throwable $e) {
echo $e->getMessage() . "\n";
}
echo "ok\n";
?>
--EXPECT--
bomb!
ok
|