#42979 [NEW]: method_exists does not document static behavior
| From: | gabe at mudbugmedia dot com | Date: | Mon, 15 Oct 2007 18:14:27 +0000 |
| Subject: | #42979 [NEW]: method_exists does not document static behavior | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-112@lists.php.net to get a copy of this message | ||
From: gabe at mudbugmedia dot com
Operating system:
PHP version: Irrelevant
PHP Bug Type: Documentation problem
Bug description: method_exists does not document static behavior
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 bug report at http://bugs.php.net/?id=42979&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=42979&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=42979&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=42979&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=42979&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=42979&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=42979&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=42979&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=42979&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=42979&r=support
Expected behavior: http://bugs.php.net/fix.php?id=42979&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=42979&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=42979&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=42979&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=42979&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=42979&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=42979&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=42979&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=42979&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=42979&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=42979&r=mysqlcfg