note 111391 added to function.method-exists
| From: | konzertheld at thedomainistheusersname dot de | Date: | Fri, 15 Feb 2013 05:32:57 +0000 |
| Subject: | note 111391 added to function.method-exists | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-193642@lists.php.net to get a copy of this message | ||
Note that prepending the namespace (if any) is required even if the calling class is in the same
namespace:
<?php
namespace test;
class foo {
public function lookup() {
// will return false
return method_exists('bar', 'nonsense_method');
}
}
class bar {
public function nonsense_method() {
// will return true
return method_exists('test\foo', 'lookup');
}
}
?>
----
Server IP: 69.147.83.199
Probable Submitter: 188.100.79.40
----
Manual Page -- http://php.net/manual/en/function.method-exists.php
Edit -- https://master.php.net/note/edit/111391
Del: integrated -- https://master.php.net/note/delete/111391/integrated
Del: useless -- https://master.php.net/note/delete/111391/useless
Del: bad code -- https://master.php.net/note/delete/111391/bad+code
Del: spam -- https://master.php.net/note/delete/111391/spam
Del: non-english -- https://master.php.net/note/delete/111391/non-english
Del: in docs -- https://master.php.net/note/delete/111391/in+docs
Del: other reasons-- https://master.php.net/note/delete/111391
Reject -- https://master.php.net/note/reject/111391
Search -- https://master.php.net/manage/user-notes.php