WordPress at a glance
function is not described

WP_REST_Request::offsetExists() public WP 4.4.0

Checks if a parameter is set.

{} It's a method of the class: WP_REST_Request{}

No Hooks.

Return

true/false. Whether the parameter is set.

Usage

$WP_REST_Request = new WP_REST_Request();
$WP_REST_Request->offsetExists( $offset );
$offset(string) (required)
Parameter name.

Changelog

Since 4.4.0 Introduced.

Code of WP_REST_Request::offsetExists() WP 5.5.2

<?php
public function offsetExists( $offset ) {
	$order = $this->get_parameter_order();

	foreach ( $order as $type ) {
		if ( isset( $this->params[ $type ][ $offset ] ) ) {
			return true;
		}
	}

	return false;
}