WordPress at a glance
function is not described

WP_Block_List::offsetGet() public WP 5.5.0

Returns the value by the specified block index.

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

No Hooks.

Return

Mixed/null. Block value if exists, or null.

Usage

$WP_Block_List = new WP_Block_List();
$WP_Block_List->offsetGet( $index );
$index(string) (required)
Index of block value to retrieve.

Changelog

Since 5.5.0 Introduced.

Code of WP_Block_List::offsetGet() WP 5.5.1

<?php
public function offsetGet( $index ) {
	$block = $this->blocks[ $index ];

	if ( isset( $block ) && is_array( $block ) ) {
		$block                  = new WP_Block( $block, $this->available_context, $this->registry );
		$this->blocks[ $index ] = $block;
	}

	return $block;
}