← All docs

get_class()

Returns the name of the class of an object.

get_class()

function get_class(object $object = null): string

Returns the name of the class of an object.

Parameters:

  • $object (object), default null, optional

Returns: string

No examples yet — check examples/ and showcases/ for usage patterns.

Internals

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