blob: e94f0e1b6e3dc7d0df038e4ccbc92a539556b731 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
--TEST--
Throwing exception using a class that isn't derived from the Exception base class
--FILE--
<?php
class Foo { }
try {
throw new Foo();
} catch (Foo $e) {
var_dump($e);
}
?>
--EXPECTF--
Fatal error: Uncaught Error: Cannot throw objects that do not implement Throwable in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
|