Documentation

Uuid
in package

Pop utils UUID helper class

Tags
category

Pop

author

Nick Sagona, III dev@noladev.com

copyright

Copyright (c) 2009-2026 NOLA Interactive, LLC.

license

https://www.popphp.org/license New BSD License

version
2.3.0

Table of Contents

Methods

v4()  : string
Generate a v4 UUID (random)
v4Linux()  : string
Generate a v4 UUID (random) using the Linux random/uuid file
v4LinuxAvailable()  : bool
Check if the Linux random/uuid file is available
v7()  : string
Generate a v7 UUID (time-based)

Methods

v4()

Generate a v4 UUID (random)

public static v4() : string
Return values
string

v4Linux()

Generate a v4 UUID (random) using the Linux random/uuid file

public static v4Linux([string $file = '/proc/sys/kernel/random/uuid' ]) : string
Parameters
$file : string = '/proc/sys/kernel/random/uuid'
Return values
string

v4LinuxAvailable()

Check if the Linux random/uuid file is available

public static v4LinuxAvailable([string $file = '/proc/sys/kernel/random/uuid' ]) : bool
Parameters
$file : string = '/proc/sys/kernel/random/uuid'
Return values
bool

v7()

Generate a v7 UUID (time-based)

public static v7() : string
Return values
string

        
On this page

Search results