php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #42979 method_exists does not document static behavior
Submitted: 2007-10-15 18:14 UTC Modified: 2007-10-16 10:01 UTC
From: gabe at mudbugmedia dot com Assigned:
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: gabe at mudbugmedia dot com
New email:
PHP Version: OS:

 

 [2007-10-15 18:14 UTC] 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'));

?>


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-10-16 10:01 UTC] rquadling@php.net
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.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Thu Oct 08 01:00:01 2026 UTC