PHPackages                             phptars/tars-utils - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. phptars/tars-utils

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

phptars/tars-utils
==================

tars的php辅助文件

0.3.2(4y ago)011.7k↓100%2[1 issues](https://github.com/TarsPHP/tars-utils/issues)2PHPPHP &gt;=5.3

Since Sep 21Pushed 4y ago6 watchersCompare

[ Source](https://github.com/TarsPHP/tars-utils)[ Packagist](https://packagist.org/packages/phptars/tars-utils)[ RSS](/packages/phptars-tars-utils/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (8)Used By (2)

tars-utils
==========

[](#tars-utils)

---

`tars-utils` is an auxiliary class library of phptars, which mainly provides the following functions:

- Profile resolution and caching (swoole table)
- Master address resolution
- Node reporting configuration analysis

### @parseFile($configPath)

[](#parsefileconfigpath)

For configuration file parsing, take `qdphp.Tarsserver.Config.Conf` as an example to parse `conf` file into array form

### @getLocatorInfo($locatorString)

[](#getlocatorinfolocatorstring)

Address resolution, example:

```
$locatorString = "tars.tarsregistry.QueryObj@tcp -h 127.0.0.1 -p 17890:tcp -h 127.0.0.1 -p 17890";

$locatorInfo = \Tars\Utils::getLocatorInfo($locatorString);
```

result as below：

```
[
	'locatorName' => 'tars.tarsregistry.QueryObj',
	'routeInfo' => [
		[
			'sHost' => '127.0.0.1',
			'sProtocol' => 'tcp',
			'iPort' => 17890,
			'iTimeout' => '',
			'bIp' => '',
			'sIp' => ''
		],
		[
			'sHost' => '127.0.0.1',
			'sProtocol' => 'tcp',
			'iPort' => 17890,
			'iTimeout' => '',
			'bIp' => '',
			'sIp' => ''
		]
	]
]
```

### @parseNodeInfo($nodeInfo)

[](#parsenodeinfonodeinfo)

Node reporting configuration resolution, for example:

```
$locatorString = "tars.tarsnode.ServerObj@tcp -h 127.0.0.1 -p 2345 -t 10000";

$nodeInfo = \Tars\Utils::parseNodeInfo($locatorString);
```

The results are as follows:

```
[
	'objName' => 'tars.tarsnode.ServerObj',
	'mode' => 'tcp',
	'host' => '127.0.0.1',
	'port' => 2345,
	'timeout' => 1,
	'sIp' => '',
	'iPort' => 2345
]
```

Changelog
---------

[](#changelog)

### v0.3.0(2019-06-21)

[](#v0302019-06-21)

- support Multiple servant

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 66.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~327 days

Total

5

Last Release

1477d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bf1b3ee26ddb9ebe4490a8f1bcd84a7450fa70cf0bf367fd6c267ba7d353d3fd?d=identicon)[phptars](/maintainers/phptars)

---

Top Contributors

[![meijing0114](https://avatars.githubusercontent.com/u/2072584?v=4)](https://github.com/meijing0114 "meijing0114 (12 commits)")[![bobzhangyong](https://avatars.githubusercontent.com/u/4799677?v=4)](https://github.com/bobzhangyong "bobzhangyong (3 commits)")[![danielzheng-Tencent](https://avatars.githubusercontent.com/u/60135050?v=4)](https://github.com/danielzheng-Tencent "danielzheng-Tencent (1 commits)")[![lanlin](https://avatars.githubusercontent.com/u/3468024?v=4)](https://github.com/lanlin "lanlin (1 commits)")[![ruanshudong](https://avatars.githubusercontent.com/u/54276924?v=4)](https://github.com/ruanshudong "ruanshudong (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/phptars-tars-utils/health.svg)

```
[![Health](https://phpackages.com/badges/phptars-tars-utils/health.svg)](https://phpackages.com/packages/phptars-tars-utils)
```

###  Alternatives

[stingbo/easyexchange

easy use digital currency exchange sdk

871.3k](/packages/stingbo-easyexchange)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
