WP_Comment::to_array
Converts object to array.
Method of the class: WP_Comment{}
No Hooks.
Returns
array<string, mixed>. Object as array.
Usage
$WP_Comment = new WP_Comment(); $WP_Comment->to_array(): array;
Changelog
| Since 4.4.0 | Introduced. |
WP_Comment::to_array() WP Comment::to array code WP 7.1.2
public function to_array(): array {
/** @var Data_Array $comment */
$comment = get_object_vars( $this );
return $comment;
}