Skip to content

nullivex/func-gen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Generation functions: handles, uuid, etc

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages