Page MenuHomePhorge

Utils.php
No OneTemporary

Authored By
Unknown
Size
550 B
Referenced Files
None
Subscribers
None

Utils.php

<?php
namespace App;
use Ramsey\Uuid\Uuid;
class Utils
{
/**
Returns an integer derived from a UUID.
@return integer
*/
public static function uuidInt()
{
$hex = Uuid::uuid4();
$bin = pack('h*', str_replace('-', '', $hex));
$ids = unpack('L', $bin);
$id = array_shift($ids);
return $id;
}
/**
Returns a UUID in the form of a string.
@return string
*/
public static function uuidStr()
{
return (string) Uuid::uuid4();
}
}

File Metadata

Mime Type
text/x-php
Expires
Fri, Apr 24, 1:59 PM (1 w, 3 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18856933
Default Alt Text
Utils.php (550 B)

Event Timeline