PHP » PYTHON |
login |
register |
about
|
PYTHON get_class_methods
is this article helpful?
|
Python replacement for PHP's get_class_methods
[
edit
| history
]
Example with "Foo" class:
[method for method in Foo.__dict__.keys() if callable(getattr(Foo, method))] Return a list of methods get_class_methods(PHP 4, PHP 5) get_class_methods — Gets the class methods' names Parameters
Return ValuesReturns an array of method names defined for the class specified by class_name . In case of an error, it returns NULL. Changelog
Examples
Example #1 get_class_methods() example
<?phpThe above example will output: myclass myfunc1 myfunc2
See Also
|
more
Recently updated
more
Most requested
|