Download the PHP package ordinary/uid without Composer

On this page you can find all versions of the php package ordinary/uid. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package uid

Ordinary UID

Ordinary UID is a simple solution for generating universally unique ids.

Table of Contents

Getting Started

Install using composer.

Using the generator

Features

Universally unique

IDs generated are considered to be universally unique with the assumption that no two machines will generate a UID at the exact same time with the exact same random bytes.

Time based

The first part is a hexadecimal representation of the timestamp from which it was created. The second part is also a hexadecimal representation of the fractional time of the timestamp from which it was created

Sortable

With the first two parts being representations of time, UIDs can be easily sorted by creation time, by sorting them by their string value. Additionally, if UID is generated using a custom value for custom bytes, the custom bytes portion will be sortable as well, as long as the custom value would have been sortable.

Custom time precision

UID Interface Methods

UIDInterface::value()

Get the string value of a UID instance.

UIDInterface::dateTime()

Get a DateTimeImmutable instance of the UID.

UIDInterface::timeSeconds()

Get the timestamp in seconds of the UID.

UIDInterface::timeFraction()

Get the fraction of a second in units determined by the precision.

UIDInterface::timePrecision()

Get the precision used to create the UID.

UIDInterface::custom()

Get the custom bytes of the UID.

UID Generator Methods

Generator::generate(int $customBytes)

Generate an Ordinary UID with a given number of random bytes.

Generator::generateCustom(string $custom)

Generate an Ordinary UID with the given bytes. $custom can be any string as long as the number of bytes is between 1 and 15.


All versions of uid with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
psr/clock Version ^1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ordinary/uid contains the following files

Loading the files please wait ....