From 86da9d950137b26ef6a0fdabb052782fc9e5a1b9 Mon Sep 17 00:00:00 2001 From: Christoph Michael Becker Date: Fri, 28 Aug 2015 12:39:57 +0000 Subject: [PATCH] PHP7 update (contributed by jhdxr) git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@337661 c90b9560-bf6c-de11-be94-00142212c4b1 --- .../functions/set-exception-handler.xml | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/reference/errorfunc/functions/set-exception-handler.xml b/reference/errorfunc/functions/set-exception-handler.xml index 97eb7bfbd5..9ad5423368 100644 --- a/reference/errorfunc/functions/set-exception-handler.xml +++ b/reference/errorfunc/functions/set-exception-handler.xml @@ -32,7 +32,7 @@ Name of the function to be called when an uncaught exception occurs. This handler function needs to accept one parameter, which will be the exception object that - was thrown. This is the handler signature: + was thrown. This is the handler signature before PHP 7: @@ -40,6 +40,18 @@ Exceptionex + + Since PHP 7, most errors are reported by throwing Error + exceptions, which will be caught by the handler as well. Both Error + and Exception implements the Throwable interface. + This is the handler signature since PHP 7: + + + + voidhandler + Throwableex + + &null; may be passed instead, to reset this handler to its default state. @@ -76,6 +88,13 @@ + + 7.0.0 + + The type of parameter passed into exception_handler changed + from Exception to Throwable + + 5.5.0