WordPress at a glance
function is not described

rest_is_object() WP 5.5.0

Determines if a given value is object-like.

No Hooks.

Return

true|false. True if object like, otherwise false.

Usage

rest_is_object( $maybe_object );
$maybe_object(mixed) (required)
The value being evaluated.

Changelog

Since 5.5.0 Introduced.

Code of rest_is_object() WP 5.7.2

<?php
function rest_is_object( $maybe_object ) {
	if ( '' === $maybe_object ) {
		return true;
	}

	if ( $maybe_object instanceof stdClass ) {
		return true;
	}

	if ( $maybe_object instanceof JsonSerializable ) {
		$maybe_object = $maybe_object->jsonSerialize();
	}

	return is_array( $maybe_object );
}