public static function guid()
    {
        return sprintf(
            '%s-%s-%s-%s-%s',
            bin2hex(openssl_random_pseudo_bytes(4)),
            bin2hex(openssl_random_pseudo_bytes(2)),
            bin2hex(openssl_random_pseudo_bytes(2)),
            bin2hex(openssl_random_pseudo_bytes(2)),
            bin2hex(openssl_random_pseudo_bytes(6))
        );
    }
public static function guid()
    {
        return sprintf(
            '%s-%s-%s-%s-%s',
            bin2hex(openssl_random_pseudo_bytes(4)),
            bin2hex(openssl_random_pseudo_bytes(2)),
            bin2hex(openssl_random_pseudo_bytes(2)),
            bin2hex(openssl_random_pseudo_bytes(2)),
            bin2hex(openssl_random_pseudo_bytes(6))
        );
    }
public static function guid ( ) { return sprintf ( '%s-%s-%s-%s-%s' , bin2hex ( openssl_random_pseudo_bytes ( 4 ) ) , bin2hex ( openssl_random_pseudo_bytes ( 2 ) ) , bin2hex ( openssl_random_pseudo_bytes ( 2 ) ) , bin2hex ( openssl_random_pseudo_bytes ( 2 ) ) , bin2hex ( openssl_random_pseudo_bytes ( 6 ) ) ) ; }
Returns a GUID for use in REST calls.

@see http://en.wikipedia.org/wiki/Globally_unique_identifier

@return string
Returns a GUID for use in REST calls .