PHPackages                             battleyephp/guid - 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. battleyephp/guid

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

battleyephp/guid
================

PHP BattlEye GUID

v2.0.0(1mo ago)11671MITPHPPHP ^8.3CI passing

Since May 1Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/battleyephp/guid)[ Packagist](https://packagist.org/packages/battleyephp/guid)[ Docs](https://github.com/battleyephp/guid)[ RSS](/packages/battleyephp-guid/feed)WikiDiscussions 2.x Synced 1mo ago

READMEChangelog (3)Dependencies (8)Versions (6)Used By (1)

PHP BattlEye GUID
=================

[](#php-battleye-guid)

[![Latest Version on Packagist](https://camo.githubusercontent.com/a73ad2e0b9bef835047f24a84656a9d4c1f0555fe2859970cb86843362592d5e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f626174746c6579657068702f677569642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/battleyephp/guid)[![Tests](https://camo.githubusercontent.com/79408af689965f7a9f074a441fafc51f5cf95e7bbcff7d48144f10febd1a1d99/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f626174746c6579657068702f677569642f74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/battleyephp/guid/actions/workflows/tests.yml)[![Total Downloads](https://camo.githubusercontent.com/47c092c96c04fe6633f1902727784e4a3e75daeb87cca8310c5f208989855016/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f626174746c6579657068702f677569642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/battleyephp/guid)

It provides BattlEye GUID value object.
It also can be converted from SteamID64.

Installation
------------

[](#installation)

> **Requires [PHP 8.3+](https://php.net/releases/)**

You can install the package via composer:

```
composer require battleyephp/guid
```

Usage
-----

[](#usage)

To create a GUID from a SteamID64:

```
use BattlEye\Guid\Guid;

$guid = Guid::fromSteamId64(76561198066209976);

echo $guid->toString(); // 'a0d1158281d8639495a1908b5a802470'

// It is stringable, so you can
// cast it to the string.
echo (string) $guid;
```

You can pass an already calculated GUID string to create an object:

```
use BattlEye\Guid\Guid;

$guid = Guid::fromString('a0d1158281d8639495a1908b5a802470');
// same as
$guid = new Guid('a0d1158281d8639495a1908b5a802470');
```

> Note: It can contain only valid MD5 hash, otherwise it throws an exception.

```
use BattlEye\Guid\Exceptions\InvalidGuidException;
use BattlEye\Guid\Guid;

try {
    Guid::fromString('invalid');
} catch (InvalidGuidException) {
    // ...
}
```

Shortcut method to check if GUIDs are the same:

```
use BattlEye\Guid\Guid;

$one = Guid::fromString('a0d1158281d8639495a1908b5a802470');
$two = Guid::fromSteamId64(76561198066209976);

if ($one->equals($two)) {
    // they are the same...
}
```

Testing
-------

[](#testing)

```
composer test
```

###  Health Score

45

—

FairBetter than 93% of packages

Maintenance88

Actively maintained with recent releases

Popularity16

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~81 days

Total

5

Last Release

59d ago

Major Versions

1.x-dev → v2.0.02026-03-20

PHP version history (2 changes)v1.0.0PHP ^8.2

1.x-devPHP ^8.3

### Community

Maintainers

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

---

Top Contributors

[![smitt14ua](https://avatars.githubusercontent.com/u/13200576?v=4)](https://github.com/smitt14ua "smitt14ua (12 commits)")

---

Tags

phpbattleye

###  Code Quality

TestsPest

Static AnalysisPHPStan, Rector

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/battleyephp-guid/health.svg)

```
[![Health](https://phpackages.com/badges/battleyephp-guid/health.svg)](https://phpackages.com/packages/battleyephp-guid)
```

###  Alternatives

[imanghafoori/laravel-anypass

A minimal yet powerful package to help you in development.

21421.6k](/packages/imanghafoori-laravel-anypass)

PHPackages © 2026

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