|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-12-28 18:23 UTC] andrey@php.net
[2004-01-01 21:07 UTC] sniper@php.net
[2004-01-06 20:52 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 08:00:01 2025 UTC |
Description: ------------ Calling get_class_methods([obj]); on an object returns next to public methods it's private and protected methods. I guess those methods should only be returned when calling get_class_methods($this); within an object. Reproduce code: --------------- <pre><?php class test { public function pub_function() { // some code } private function priv_function() { // some code } } $test = new test; $arry = get_class_methods($test); foreach ( $arry AS $n => $method_name ) { echo $n." -> ".$method_name."\n"; } ?></pre> Expected result: ---------------- empty page :-) Actual result: -------------- 0 -> pub_function 1 -> priv_function