#42979 [Opn->Csd]: method_exists does not document static behavior

From: Date: Tue, 16 Oct 2007 10:01:45 +0000
Subject: #42979 [Opn->Csd]: method_exists does not document static behavior
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-119@lists.php.net to get a copy of this message
ID: 42979 Updated by: rquadling@php.net Reported By: gabe at mudbugmedia dot com -Status: Open +Status: Closed Bug Type: Documentation problem PHP Version: Irrelevant New Comment: This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. Previous Comments: ------------------------------------------------------------------------ [2007-10-15 18:14:27] gabe at mudbugmedia dot com Description: ------------ currently the method_exists documentation at http://us3.php.net/method_exists does not define behavior for detecting a static method. Currently in PHP 5.1+ you can detect a static method by passing a string containing the class name instead of an instance of that class. The documentation should be updated to make mention of this behavior, or the behavior should probably be removed if it's been flying under the radar and shouldn't be there. Reproduce code: --------------- <?php class Foo { public static function bar () { echo 'woo'; } } var_dump(method_exists('Foo', 'bar')); ?> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=42979&edit=1

« previous php.doc.bugs (#119) next »