I have a function who generates a Hex number:
function generateUid(){
$uuid = Uuid::uuid4();
$uuid = $uuid->getHex();
$uuid = substr($uuid,8);
return $uuid;
}
The hex has the length of 25 but I want to cut it to only 8 digits.