[doc-en] master: set-error-handler.xml Remove the misleading statement
| From: | Mikhail Alferov via Jakub Vrána | Date: | Thu, 24 Apr 2025 14:19:12 +0000 |
| Subject: | [doc-en] master: set-error-handler.xml Remove the misleading statement | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-22636@lists.php.net to get a copy of this message | ||
Author: Mikhail Alferov (mmalferov)
Committer: Jakub Vrána (vrana)
Date: 2025-04-24T16:08:57+02:00
Commit: https://github.com/php/doc-en/commit/21ce7d7f4f9f6f241f3e09e7f0a5be5c504d90d2
Raw diff: https://github.com/php/doc-en/commit/21ce7d7f4f9f6f241f3e09e7f0a5be5c504d90d2.diff
set-error-handler.xml Remove the misleading statement
For the method of the class as an error handler, the
set_error_handler function may
return a callable:
a) a string
b) a Closure
c) an indexed array (with the name of the class or an instance of the class in the first element,
and the name of the method in the second one)
However, it is not limited to just "an indexed array with the class and method name".
I suggest removing the mention of the array as a return value, otherwise we will have to list every
possible type of callable value :)
Changed paths:
M reference/errorfunc/functions/set-error-handler.xml
Diff:
diff --git a/reference/errorfunc/functions/set-error-handler.xml
b/reference/errorfunc/functions/set-error-handler.xml
index 35b2220cae41..f425fd317229 100644
--- a/reference/errorfunc/functions/set-error-handler.xml
+++ b/reference/errorfunc/functions/set-error-handler.xml
@@ -159,11 +159,8 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
- Returns the previously defined error handler (if any). If
- the built-in error handler is used &null; is returned.
- If the previous error handler
- was a class method, this function will return an indexed array with the class
- and the method name.
+ Returns the previously defined error handler (if any) as a <type>callable</type>.
+ If the built-in error handler is used &null; is returned.
</para>
</refsect1>