#20216 [Opn->Fbk]: is_callable needs documentation
| From: | philip@php.net | Date: | Mon, 18 Nov 2002 08:01:01 +0000 |
| Subject: | #20216 [Opn->Fbk]: is_callable needs documentation | ||
| References: | 1 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969349765@lists.php.net to get a copy of this message | ||
ID: 20216
Updated by: philip@php.net
Reported By: leon@leonatkinson.com
-Status: Open
+Status: Feedback
Bug Type: Documentation problem
Operating System: RH 7.3
PHP Version: 4CVS-2002-11-01
New Comment:
This is now (almost) documented and can be seen here:
http://cvs.php.net/co.php/phpdoc/en/reference/var/functions/is-callable.xml
It's currently commented out as I'm not comfortable with these docs or
this topic. Please provide some more feedback :)
Previous Comments:
------------------------------------------------------------------------
[2002-11-01 16:53:24] leon@leonatkinson.com
Please add a description of is_callable to the documentation. Here are
some rough notes about how what this function does.
This function wraps zend_is_callable. The first argument is the name
of a function or method. Class an object methods are specified by
passing an array with two elements: class or object and method name.
The second argument seems to be for checking syntax only, but I can't
figure out how to make is_callable return FALSE when the second
argument is TRUE.
The third argument receives the "callable name". In the example below
it's "a::b". Note, however, that despite the implication that a::b()
is a callable static method, this is not the case.
<?
class a
{
var $c;
function b()
{
return($this->c);
}
}
$d = new a;
if(is_callable(array($d, 'b'), FALSE, $name))
{
print($name);
}
?>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=20216&edit=1