← All docs

get_class_methods()

Returns visible PHP method names, excluding generated property-hook accessors. AOT supports direct calls, literal call_user_func calls, first-class callables, and argument unpacking, with an object, a class-name string, or a boxed value whose runtime tag is an object or a string; any other tag throws TypeError. Runtime-selected callable targets are unsupported.

get_class_methods()

function get_class_methods(mixed $object_or_class): array

Returns visible PHP method names, excluding generated property-hook accessors. AOT supports direct calls, literal call_user_func calls, first-class callables, and argument unpacking, with an object, a class-name string, or a boxed value whose runtime tag is an object or a string; any other tag throws TypeError. Runtime-selected callable targets are unsupported.

Parameters:

  • $object_or_class (mixed)

Returns: array

Availability

No examples yet. Check examples/ and showcases/ for usage patterns.

Internals

For how get_class_methods is implemented in the compiler, see the internals page.