lib/Util/RandomGenerator.php
public function uuid()
    {
        $arr = array_values(unpack('N1a/n4b/N1c', openssl_random_pseudo_bytes(16)));
        $arr[2] = ($arr[2] & 0x0fff) | 0x4000;
        $arr[3] = ($arr[3] & 0x3fff) | 0x8000;
        return vsprintf('%08x-%04x-%04x-%04x-%04x%08x', $arr);
    }
public function uuid()
    {
        $arr = array_values(unpack('N1a/n4b/N1c', openssl_random_pseudo_bytes(16)));
        $arr[2] = ($arr[2] & 0x0fff) | 0x4000;
        $arr[3] = ($arr[3] & 0x3fff) | 0x8000;
        return vsprintf('%08x-%04x-%04x-%04x-%04x%08x', $arr);
    }
public function uuid ( ) { $ arr = array_values ( unpack ( 'N1a/n4b/N1c' , openssl_random_pseudo_bytes ( 16 ) ) ) ; $ arr [ 2 ] = ( $ arr [ 2 ] & 0x0fff ) | 0x4000 ; $ arr [ 3 ] = ( $ arr [ 3 ] & 0x3fff ) | 0x8000 ; return vsprintf ( '%08x-%04x-%04x-%04x-%04x%08x' , $ arr ) ; }
Returns a v4 UUID.

@return string
Returns a v4 UUID .