mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00
PHP7 update (contributed by jhdxr)
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@337661 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
fd99f26061
commit
86da9d9501
1 changed files with 20 additions and 1 deletions
|
@ -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:
|
||||
</para>
|
||||
<para>
|
||||
<methodsynopsis>
|
||||
|
@ -40,6 +40,18 @@
|
|||
<methodparam><type>Exception</type><parameter>ex</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
</para>
|
||||
<para>
|
||||
Since PHP 7, most errors are reported by throwing <classname>Error</classname>
|
||||
exceptions, which will be caught by the handler as well. Both <classname>Error</classname>
|
||||
and <classname>Exception</classname> implements the <classname>Throwable</classname> interface.
|
||||
This is the handler signature since PHP 7:
|
||||
</para>
|
||||
<para>
|
||||
<methodsynopsis>
|
||||
<type>void</type><methodname><replaceable>handler</replaceable></methodname>
|
||||
<methodparam><type>Throwable</type><parameter>ex</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
</para>
|
||||
<para>
|
||||
&null; may be passed instead, to reset this handler to its default state.
|
||||
</para>
|
||||
|
@ -76,6 +88,13 @@
|
|||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>7.0.0</entry>
|
||||
<entry>
|
||||
The type of parameter passed into <parameter>exception_handler</parameter> changed
|
||||
from <classname>Exception</classname> to <classname>Throwable</classname>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>5.5.0</entry>
|
||||
<entry>
|
||||
|
|
Loading…
Reference in a new issue