PHPackages                             abublihi/guid-to-base64 - 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. abublihi/guid-to-base64

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

abublihi/guid-to-base64
=======================

Convert microsoft ldap objectGuid to Base64.

v2.0(4y ago)33.1kMITPHPPHP ^7.2 || ^8.0

Since Dec 1Pushed 4y ago1 watchersCompare

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

READMEChangelogDependencies (2)Versions (3)Used By (0)

---

**NOTE:** For php &lt;=7.1 see v1.0

---

ObjectGuid to base64 encode
===========================

[](#objectguid-to-base64-encode)

This package only provides a function to encode an Object Guid to base64.

Problem
=======

[](#problem)

Microsoft azure immutable id is an encoding of the Object Guid to base64. but if you tray to `encode` the object guid directly it will preduse a not acceptable value or incorrect to the immutable id in microsoft azure. see example below

```
echo base64_encode("7ea2e22f-31cb-4c97-89eb-1b4501aafe40");
// output is "N2VhMmUyMmYtMzFjYi00Yzk3LTg5ZWItMWI0NTAxYWFmZTQw"
```

So this packge solves the problem.

Installation
============

[](#installation)

```
composer require abublihi/guid-to-base64
```

Usage
=====

[](#usage)

```
use Abublihi\Guid\ToBase64;

$toBase64 = new ToBase64("7ea2e22f-31cb-4c97-89eb-1b4501aafe40");
echo $toBase64->getBase64(); // output "L+Kifssxl0yJ6xtFAar+QA=="
```

```
use Abublihi\Guid\ToBase64;

echo ToBase64::encode("748b2d72-706b-42f8-8b25-82fd8733860f"); // output "ci2LdGtw+EKLJYL9hzOGDw=="
```

Requirements
============

[](#requirements)

This package deeply depends on `ramsey/uuid` package.

References
==========

[](#references)

[Azure AD Connect: Design concepts](https://docs.microsoft.com/en-us/azure/active-directory/hybrid/plan-connect-design-concepts)

Credits
=======

[](#credits)

- Thanks to [`Martijn Pieters`](https://github.com/mjpieters) for the discussion in [discuss.python.org](https://discuss.python.org/t/azuread-uid-to-immutable-id/2637/15).
- [@almodhfer](https://github.com/almodhfer) Thank for helping me.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community7

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

Total

2

Last Release

1617d ago

PHP version history (2 changes)v2.0PHP ^7.2 || ^8.0

v1.0PHP &gt;=5.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/790f184ed7c6f53a40ad069c47173cd3185c3becb63b1518e087d2e7162d5582?d=identicon)[Abublihi](/maintainers/Abublihi)

---

Top Contributors

[![abublihi](https://avatars.githubusercontent.com/u/10172039?v=4)](https://github.com/abublihi "abublihi (2 commits)")

---

Tags

guidguid-to-base64object-guidbase64guidmicrosoftObjectGUIDimmutableidimmutable id

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/abublihi-guid-to-base64/health.svg)

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

###  Alternatives

[ramsey/uuid

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

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

Constant-time Implementations of RFC 4648 Encoding (Base-64, Base-32, Base-16)

901329.7M148](/packages/paragonie-constant-time-encoding)[pascaldevink/shortuuid

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

5951.8M15](/packages/pascaldevink-shortuuid)[spomky-labs/base64url

Base 64 URL Safe Encoding/Decoding PHP Library

15439.5M49](/packages/spomky-labs-base64url)[elfsundae/laravel-hashid

A simple, elegant way to obfuscate your data by generating reversible, non-sequential, URL-safe identifiers.

415246.3k2](/packages/elfsundae-laravel-hashid)[sebbmeyer/php-microsoft-teams-connector

PHP Microsoft Teams Connector

1191.1M3](/packages/sebbmeyer-php-microsoft-teams-connector)

PHPackages © 2026

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