note 71521 added to function.method-exists
| From: | php-general at lists dot php dot net | Date: | Mon, 04 Dec 2006 10:14:04 +0000 |
| Subject: | note 71521 added to function.method-exists | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-120262@lists.php.net to get a copy of this message | ||
Not (yet) mentioned in the docs: since PHP 5 the first argument may also be a string with the class
name:
class foo {
function bar () {}
}
var_dump(method_exists('foo','bar'));
Will output bool(true) - however note that this won't work in PHP 4. When running PHP 4 this
will output bool(false).
Tested with PHP 5.1 / PHP 4.3
----
Server IP: 66.163.161.117
Probable Submitter: 213.238.41.61 (proxied: 192.168.168.42)
----
Manual Page -- http://www.php.net/manual/en/function.method-exists.php
Edit -- https://master.php.net/note/edit/71521
Del: integrated -- https://master.php.net/note/delete/71521/integrated
Del: useless -- https://master.php.net/note/delete/71521/useless
Del: bad code -- https://master.php.net/note/delete/71521/bad+code
Del: spam -- https://master.php.net/note/delete/71521/spam
Del: non-english -- https://master.php.net/note/delete/71521/non-english
Del: in docs -- https://master.php.net/note/delete/71521/in+docs
Del: other reasons-- https://master.php.net/note/delete/71521
Reject -- https://master.php.net/note/reject/71521
Search -- https://master.php.net/manage/user-notes.php