note 65213 added to function.method-exists
| From: | seufert at gmail dot com | Date: | Thu, 27 Apr 2006 01:27:47 +0000 |
| Subject: | note 65213 added to function.method-exists | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-109807@lists.php.net to get a copy of this message | ||
Just a note that the behaviour of this function changed between version 5.0.x and 5.1.x when using
static member functions
Using this code:
<?php
class a {
static function test() {return "A";}
}
if(method_exists('a','test'))
print call_user_func(array('a','test'));
else
print "Nothing";
?>
PHP 5.1.x returns "A"
PHP 5.0.x returns "Nothing"
Im not sure of a workaround for PHP 5.0.x yet.
----
Server IP: 203.16.234.19
Probable Submitter: 61.9.146.116
----
X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER
autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/function.method-exists.php
Edit -- http://master.php.net/note/edit/65213
Del: integrated -- http://master.php.net/note/delete/65213/integrated
Del: useless -- http://master.php.net/note/delete/65213/useless
Del: bad code -- http://master.php.net/note/delete/65213/bad+code
Del: spam -- http://master.php.net/note/delete/65213/spam
Del: non-english -- http://master.php.net/note/delete/65213/non-english
Del: in docs -- http://master.php.net/note/delete/65213/in+docs
Del: other reasons-- http://master.php.net/note/delete/65213
Reject -- http://master.php.net/note/reject/65213
Search -- http://master.php.net/manage/user-notes.php