ID: 48481
User updated by: xsist10 at gmail dot com
Reported By: xsist10 at gmail dot com
-Status: Open
+Status: Bogus
Bug Type: Class/Object related
Operating System: Ubuntu 9.04
PHP Version: 5.2.9
New Comment:
return get_class_methods(__CLASS__);
should be:
return get_class_methods($this);
Previous Comments:
------------------------------------------------------------------------
[2009-06-05 13:17:03] xsist10 at gmail dot com
Description:
------------
get_class_methods returns the parents methods when called from a
protected/public function in the parent from an inherited child.
Reproduce code:
---------------
class Foo {
function getFunctions() {
return get_class_methods(__CLASS__);
}
function test1() {
}
}
class Bar extends Foo {
function test2() {
}
}
$bar = new Bar();
print_r($bar->getFunctions());
Expected result:
----------------
Array ( [0] => getFunctions [1] => test1 [2] => test2 )
Actual result:
--------------
Array ( [0] => getFunctions [1] => test1 )
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=48481&edit=1