Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion reference/var/functions/is-callable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<refnamediv>
<refname>is_callable</refname>
<refpurpose>
Verify that the contents of a variable can be called as a function
Verify that a value can be called as a function from the current scope.
</refpurpose>
</refnamediv>

Expand Down Expand Up @@ -151,6 +151,23 @@ bool(false)
</para>
</refsect1>

<refsect1 role="notes">
<simplelist>
<member>
An object is always callable if it implements <function>__invoke()</function>,
and that method is visible in the current scope.
</member>
<member>A class name is callable if it implements <function>__callStatic()</function></member>
<member>
If an object implements <function>__call()</function>, then this function will
return true for any method on that object, even if the method is not defined.
</member>
<member>
This function may trigger autoloading if called with the name of a class.
</member>
</simplelist>
</refsect1>

<refsect1 role="seealso">
&reftitle.seealso;
<para>
Expand Down