[DOC-CVS] [doc-en] master: set-error-handler.xml Remove the misleading statement

[email protected] (Mikhail Alferov via Jakub Vrána)
Newsgroups php.doc.cvs
Message-ID <[email protected]>
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>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.