WordPress at a glance
function is not described

WP_Query::next_comment() public WP 2.2.0

Iterate current comment index and return WP_Comment object.

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

No Hooks.

Return

WP_Comment. Comment object.

Usage

global $wp_query;
$wp_query->next_comment();

Changelog

Since 2.2.0 Introduced.

Code of WP_Query::next_comment() WP 5.7.2

<?php
public function next_comment() {
	$this->current_comment++;

	/** @var WP_Comment */
	$this->comment = $this->comments[ $this->current_comment ];
	return $this->comment;
}