Search by

arkh-tech / arkh-unique-id

arkh-tech

Library for generating unique and random codes.

Package info

github.com/Arkh-Tech/arkh-unique-id

pkg:composer/arkh-tech/arkh-unique-id

Statistics

Installs: 5

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.0.1 2026-05-18 17:18 UTC

This package is auto-updated.

Last update: 2026-09-18 17:57:06 UTC


README

Script for generate unique id in PHP

Required

PHP >= 8.0

Download

Clone the repository:

git clone https://github.com/Arkh-Tech/arkh-unique-id.git

Install

composer require arkh-tech/arkh-unique-id

Usage

<?php

require __DIR__ . '/vendor/autoload.php';

use ArkhTech\ArkhUniqueId;

$unique = new ArkhUniqueId();

// Configuration parameters
$separator    = '-';
$charTotal    = 12;
$alphaNumeric = true;

// Generate and output the ID
$id = $unique->getUniqueId($separator, $charTotal, $alphaNumeric);

echo $id . PHP_EOL;
// Output example: w9a7-a2w3-S7l2

?>