PHPackages                             takaram/uuid47 - 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. takaram/uuid47

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

takaram/uuid47
==============

PHP implementation of UUIDv47

0.1.0(7mo ago)01MITPHPPHP ^8.2CI passing

Since Sep 29Pushed 7mo agoCompare

[ Source](https://github.com/takaram/uuid47)[ Packagist](https://packagist.org/packages/takaram/uuid47)[ RSS](/packages/takaram-uuid47/feed)WikiDiscussions main Synced 1mo ago

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

UUIDv47 for PHP
===============

[](#uuidv47-for-php)

[![Packagist Version](https://camo.githubusercontent.com/f23660b5b14a47a5280fededffb752be0b34b7a74db0d0cd6b8e5e8ddd98a298/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f74616b6172616d2f757569643437)](https://packagist.org/packages/takaram/uuid47)[![Packagist Downloads](https://camo.githubusercontent.com/6b552183e1218999aa994e7583e2c973543af6caa395dd96d60c9f5fabdd58e4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f74616b6172616d2f757569643437)](https://packagist.org/packages/takaram/uuid47/stats)[![CI](https://camo.githubusercontent.com/f0e5437f3a46961b277c209b28f2a2b7f041984aec69bddb6ac99b90699f7879/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f636865636b2d72756e732f74616b6172616d2f7575696434372f6d61696e)](https://github.com/takaram/uuid47/actions/workflows/ci.yaml)[![License: MIT](https://camo.githubusercontent.com/776595547c8730c568507f59f76b28dce52215355c499fcf62f72e353235291a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f74616b6172616d2f757569643437)](https://opensource.org/licenses/MIT)

This is a PHP implementation of [UUIDv47](https://uuidv47.stateless.me/).

UUIDv47 allows you to encode a UUIDv7 into a UUIDv4 and back again. Store UUIDv7 in a database, which is timestamp-based and sortable, while showing it to users as a random-looking UUIDv4.

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

[](#installation)

Install the package with Composer:

```
composer require takaram/uuid47
```

Usage
-----

[](#usage)

Here is a simple example of how to use this library:

```
