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 3w 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

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

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

1662d 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

[pocketmine/pocketmine-mp

A server software for Minecraft: Bedrock Edition written in PHP

3.5k77.4k89](/packages/pocketmine-pocketmine-mp)[pascaldevink/shortuuid

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

5941.8M16](/packages/pascaldevink-shortuuid)[thamtech/yii2-uuid

Yii 2 UUID Helper

35359.7k7](/packages/thamtech-yii2-uuid)[ekreative/uuid-extra-bundle

Paramconverter, Normalizer and Form Type for Ramsey Uuid

18170.3k](/packages/ekreative-uuid-extra-bundle)[pyyoshi/shortuuid-php

2226.2k](/packages/pyyoshi-shortuuid-php)

PHPackages © 2026

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