WordPress at a glance
function is not described

WP_Comment::to_array() public WP 4.4.0

Convert object to array.

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

No Hooks.

Return

Array. Object as array.

Usage

$WP_Comment = new WP_Comment();
$WP_Comment->to_array();

Changelog

Since 4.4.0 Introduced.

Code of WP_Comment::to_array() WP 5.5.1

<?php
public function to_array() {
	return get_object_vars( $this );
}