[doc-en] master: Add note about first-class callables to callable type and add link to the closure documentation page (#4792)

From: Date: Wed, 15 Oct 2025 23:43:04 +0000
Subject: [doc-en] master: Add note about first-class callables to callable type and add link to the closure documentation page (#4792)
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-22811@lists.php.net to get a copy of this message
Author: Sebastian Hädrich (shaedrich) Committer: GitHub (web-flow) Pusher: kamil-tekiela Date: 2025-10-16T00:43:01+01:00 Commit: https://github.com/php/doc-en/commit/eac9eff7b66d8c2b168c25c72de0422126daf8cb Raw diff: https://github.com/php/doc-en/commit/eac9eff7b66d8c2b168c25c72de0422126daf8cb.diff Add note about first-class callables to callable type and add link to the closure documentation page (#4792) Changed paths: M language/types/callable.xml Diff: diff --git a/language/types/callable.xml b/language/types/callable.xml index 240a51f42a62..d50923a89b6a 100644 --- a/language/types/callable.xml +++ b/language/types/callable.xml @@ -18,9 +18,10 @@ <title>Passing</title> <para> - A PHP function is passed by its name as a <type>string</type>. Any built-in - or user-defined function can be used, except language constructs such as: - <function>array</function>, <function>echo</function>, + A PHP function is passed by either its name as a <type>string</type> or by + a <link linkend="functions.first_class_callable_syntax">first-class callable</link>. + Any built-in or user-defined function can be used, except language constructs + such as: <function>array</function>, <function>echo</function>, <function>empty</function>, <function>eval</function>, <function>exit</function>, <function>isset</function>, <function>list</function>, <function>print</function> or @@ -125,7 +126,7 @@ call_user_func($c, 'PHP!'); <para> <example> <title> - Callback example using a Closure + Callback example using a <classname>Closure</classname> </title> <programlisting role="php"> <![CDATA[

« previous php.doc.cvs (#22811) next »