WordPress at a glance
function is not described

wp_create_categories() WP 2.0.0

Create categories for the given post.

No Hooks.

Return

Array. List of categories to create for the given post.

Usage

wp_create_categories( $categories, $post_id );
$categories(array) (required)
List of categories to create.
$post_id(int)
The post ID.
Default: ''

Code of wp create categories: wp-admin/includes/taxonomy.php VER 5.0.3

<?php
function wp_create_categories( $categories, $post_id = '' ) {
	$cat_ids = array ();
	foreach ( $categories as $category ) {
		if ( $id = category_exists( $category ) ) {
			$cat_ids[] = $id;
		} elseif ( $id = wp_create_category( $category ) ) {
			$cat_ids[] = $id;
		}
	}

	if ( $post_id )
		wp_set_post_categories($post_id, $cat_ids);

	return $cat_ids;
}