WordPress at a glance
function is not described

WP_Query::have_comments() public WP 2.2.0

Whether there are more comments available.

Automatically rewinds comments when finished.

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

No Hooks.

Return

true/false. True if comments are available, false if no more comments.

Usage

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

Changelog

Since 2.2.0 Introduced.

Code of WP_Query::have_comments() WP 5.5.2

<?php
public function have_comments() {
	if ( $this->current_comment + 1 < $this->comment_count ) {
		return true;
	} elseif ( $this->current_comment + 1 == $this->comment_count ) {
		$this->rewind_comments();
	}

	return false;
}