openlss/func-gen

Random generation functions

0.0.8 2013-04-07 02:54 UTC

This package is not auto-updated.

Last update: 2024-04-13 12:06:50 UTC


README

Generation functions: handles, uuid, etc

Usage

$guid = gen_guid();

$handle = gen_handle();

Reference

(string) gen_guid()

Returns a GUID using either the preferred extension or a pure PHP implementation

(string) gen_handle($len=6)

Returns an alphanumeric case senstive handle for use as an ID

  • $len Length of the handle

Typically this would be used to generate pseudo-random identifiers with code like this

	do {
		$handle = gen_handle();
	} while(handleExists($handle));