Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class.php:
- class main {
- public function __call() {
- throw new Exception("Failed to call specified function");
- }
- index.php:
- include_once('class.php');
- $app = new main();
- try {
- $app->doesntexist();
- catch (Exception $e) {
- print $e->getMessage();
- }
- Output:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement