cvs: phpdoc-zh /reference/var/functions is-callable.xml

From: Date: Sun, 04 May 2003 10:32:12 +0000
Subject: cvs: phpdoc-zh /reference/var/functions is-callable.xml
Groups: php.doc.zh 
Request: Send a blank email to doc-zh+get-1416@lists.php.net to get a copy of this message
nio Sun May 4 06:32:12 2003 EDT Added files: /phpdoc-zh/reference/var/functions is-callable.xml Log: Add file Index: phpdoc-zh/reference/var/functions/is-callable.xml +++ phpdoc-zh/reference/var/functions/is-callable.xml <?xml version="1.0" encoding="gb2312"?> <!-- $Revision: 1.1 $ --> <!-- $Author: nio $ --> <!-- EN-Revision: 1.3 Maintainer: nio Status: ready --> <!-- splitted from ./en/functions/var.xml, last change in rev 1.87 --> <refentry id="function.is-callable"> <refnamediv> <refname>is_callable</refname> <refpurpose> ¼ì²â²ÎÊýÊÇ·ñΪºÏ·¨µÄ¿Éµ÷Óýṹ </refpurpose> </refnamediv> <refsect1> <title>ÃèÊö</title> <methodsynopsis> <type>bool</type><methodname>is_callable</methodname> <methodparam><type>mixed</type><parameter>var</parameter></methodparam> <methodparam choice="opt"><type>bool</type><parameter>syntax_only</parameter></methodparam> <methodparam choice="opt"><type>string</type><parameter>callable_name</parameter></methodparam> </methodsynopsis> <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> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 -->

« previous php.doc.zh (#1416) next »