src/WPametu/Utility/StringHelper.php
public function extract_host( $url ) {
		$string = (string) $url;
		if ( preg_match( '@https?://([^/\?#]+)@u', $url, $match ) ) {
			return $match[1];
		} else {
			return $url;
		}
	}
public function extract_host( $url ) {
		$string = (string) $url;
		if ( preg_match( '@https?://([^/\?#]+)@u', $url, $match ) ) {
			return $match[1];
		} else {
			return $url;
		}
	}
public function extract_host ( $ url ) { $ string = ( string ) $ url ; if ( preg_match ( '@https?://([^/\?#]+)@u' , $ url , $ match ) ) { return $ match [ 1 ] ; } else { return $ url ; } }
Extract host value from url

@param string $url

@return string
Extract host value from url