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

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

semiorbit/guid
==============

Generate a GUID in PHP that is compatible with Microsoft .NET Framework (C#) GUID.

v1.0.1(2y ago)116.9k↓25%MITPHPPHP &gt;=7.2.0

Since Aug 24Pushed 2y ago1 watchersCompare

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

READMEChangelog (1)DependenciesVersions (2)Used By (0)

GUID PHP
========

[](#guid-php)

**Semiorbit GUID** is a PHP library to create a GUID that is compatible with Microsoft .NET Framework (C#) GUID.

Install
-------

[](#install)

```
composer require semiorbit/guid

```

Documentation
-------------

[](#documentation)

### Guid::NewGuid

[](#guidnewguid)

Generates a GUID that is compatible with Microsoft .NET Framework GUID.

```
Guid::NewGuid(string $separator = '-', bool $enclose = true) : string
```

#### Params

[](#params)

- string **$separator** dash by default
- bool **$enclose** enclose a GUID in curly braces.
- returns string

```
use SemiorbitGuid\Guid;

echo Guid::NewGuid();

// OUTPUT:
// {6BE33503-D448-0264-11AC-38822224B694}
```

### Guid::Create

[](#guidcreate)

Generates a raw GUID that is compatible with Microsoft .NET Framework GUID, but not formatted or enclosed.

```
Guid::Create(): string
```

- returns string

```
use SemiorbitGuid\Guid;

echo Guid::Create();

// OUTPUT:
// 53FED73BF73C7D4C720DD8EE8DAB8B2B
```

### Guid::Format

[](#guidformat)

Returns a formatted GUID string width dashes (or selected separator) and optionally enclosed with curly braces

```
Guid::Format(string $guid, bool $enclose = true, string $separator = '-'): string
```

#### Params

[](#params-1)

- string **$guid** A guid string to parse
- bool **$enclose** True by default, to enclose guid string by **{curly braces}**
- string **$separator** Dash by default
- returns string **{xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx}**

```
use SemiorbitGuid\Guid;

$guid = '4F93820EFEF290A26489E0AE803A37C0';

echo Guid::Format($guid);

// OUTPUT:
// {4F93820E-FEF2-90A2-6489-E0AE803A37C0}
```

License
-------

[](#license)

The Semiorbit GUID is an open-source PHP library licensed under the [MIT license](http://opensource.org/licenses/MIT).

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 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 ~0 days

Total

2

Last Release

998d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/48a579e12fae115db84a3e0c6fec0edee9a0c55eaf096ac5556e08ed06eac9ae?d=identicon)[IbrahimKhalil](/maintainers/IbrahimKhalil)

---

Top Contributors

[![IbrahimKhalil](https://avatars.githubusercontent.com/u/8594928?v=4)](https://github.com/IbrahimKhalil "IbrahimKhalil (1 commits)")

---

Tags

guidDCE UUIDMicrosoft .NET GUIDGUID PHP

### Embed Badge

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

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

###  Alternatives

[ramsey/uuid

A PHP library for generating and working with universally unique identifiers (UUIDs).

12.6k700.2M3.3k](/packages/ramsey-uuid)[pascaldevink/shortuuid

PHP 7.4+ library that generates concise, unambiguous, URL-safe UUIDs

5951.8M15](/packages/pascaldevink-shortuuid)[emadadly/laravel-uuid

laravel uuid a simple, automatic UUID generator for any model based on Laravel.

120415.9k3](/packages/emadadly-laravel-uuid)[keiko/uuid-shortener

A simple shortener library for RFC 4122 compatible UUIDs. Change your 36 chars long UUID into it's shorter equivalent.

150215.4k2](/packages/keiko-uuid-shortener)[oittaa/uuid

A small PHP class for generating RFC 9562 universally unique identifiers (UUID) from version 3 to version 8.

50302.7k5](/packages/oittaa-uuid)[thamtech/yii2-uuid

Yii 2 UUID Helper

35347.9k7](/packages/thamtech-yii2-uuid)

PHPackages © 2026

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