Page MenuHomePhorge

Utils.php
No OneTemporary

Authored By
Unknown
Size
604 B
Referenced Files
None
Subscribers
None

Utils.php

<?php
namespace App;
use Ramsey\Uuid\Uuid;
/**
* Small utility functions for App.
*/
class Utils
{
/**
* Returns a UUID in the form of an integer.
*
* @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
Sun, Apr 5, 10:19 PM (2 w, 5 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
8b/4a/fed41cffbb4d331621f780d01701
Default Alt Text
Utils.php (604 B)

Event Timeline