Generation functions: handles, uuid, etc
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
func
test
.gitignore
COPYING
COPYING LESSER
README.md
composer.json

README.md

openlss/func-gen

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));