---
layout: default
title: WP_CLI\Utils\get_named_sem_ver()
description: "Compare two version strings to get the named semantic version."
---

<small><a href="/docs/">Docs</a> &raquo; <a href="/docs/internal-api/">Internal API</a> &raquo; Misc</small>

## WP_CLI\Utils\get_named_sem_ver()

Compare two version strings to get the named semantic version.

***

### Usage

    WP_CLI\Utils\get_named_sem_ver( $new_version, $original_version )

<div>
<strong>$new_version</strong> (string) <br />
<strong>$original_version</strong> (string) <br />
<strong>@return</strong> (string) 'major', 'minor', 'patch'<br />
</div>


*Internal API documentation is generated from the WP-CLI codebase on every release. To suggest improvements, please submit a pull request.*


***

### Related

<ul>



<li><strong><a href="/docs/internal-api/wp-cli-utils-write-csv/">WP_CLI\Utils\write_csv()</a></strong> - Write data as CSV to a given file.</li>


<li><strong><a href="/docs/internal-api/wp-cli-utils-http-request/">WP_CLI\Utils\http_request()</a></strong> - Make a HTTP request to a remote URL.</li>


<li><strong><a href="/docs/internal-api/wp-cli-utils-parse-ssh-url/">WP_CLI\Utils\parse_ssh_url()</a></strong> - Parse a SSH url for its host, port, and path.</li>



</ul>


