philip Mon Nov 18 02:59:05 2002 EDT
Modified files:
/phpdoc/en/reference/var/functions is-callable.xml
Log:
Initial documentation, leaving commented out for now until confirmed.
Deals with bug #20216 as per Leon's request.
Index: phpdoc/en/reference/var/functions/is-callable.xml
diff -u phpdoc/en/reference/var/functions/is-callable.xml:1.2
phpdoc/en/reference/var/functions/is-callable.xml:1.3
--- phpdoc/en/reference/var/functions/is-callable.xml:1.2 Wed Apr 17 02:44:57
2002
+++ phpdoc/en/reference/var/functions/is-callable.xml Mon Nov 18 02:59:04 2002
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.2 $ -->
+<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/var.xml, last change in rev 1.87 -->
<refentry id="function.is-callable">
<refnamediv>
@@ -19,6 +19,53 @@
<para>
&warn.undocumented.func;
</para>
+<!--
+ <simpara>
+ The <parameter>var</parameter> parameter is the name of a function or method.
+ Also, class or object methods are specified by passing a numerical array with
+ two elements: the class or object, and a method name.
+ </simpara>
+ <simpara>
+ The optional <parameter>syntax_only</parameter> parameter will check
+ only for syntax and defaults to &false; The third <parameter>
+ callable_name</parameter> parameter is also optional.
+ </simpara>
+ <para>
+ In our example below note, however, that despite the implication that
+ <literal>a::b()</literal> is a callable static method, this is not the
+ case.
+ <example>
+ <title>Using <function>is_callable</function></title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+class a
+{
+ var $c;
+
+ function b() {
+ return($this->c);
+ }
+}
+
+$d = new a;
+
+if(is_callable(array($d, 'b'), FALSE, $name)) {
+
+ echo $name;
+}
+
+/* The above will print:
+
+ a::
+
+*/
+?>
+]]>
+ </programlisting>
+ </example>
+ </para>
+-->
</refsect1>
</refentry>
--
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php