2

I am posting this question here because i could't find the right solution: I have to make a uniq transaction id which i am generating with the time() + rand() In this function still collision can happen.. My question is is there any better way to perform this within (18 digit) , And What about the rand(10 digits) vs rand(5)+rand(5)

And is there a way to controll the ramsey uuid() length

Abir Adak
  • 21
  • 3
  • UUIDs are a specific standardised format, so changing their length wouldn't make any sense (the result wouldn't be a UUID any more). – IMSoP May 06 '20 at 12:20
  • Currently not released yet (target is Symfony 5.1, which will be soon), would ULID be an option? https://symfony.com/doc/master/components/uid.html#generating-ulids – Anyone May 06 '20 at 12:42

0 Answers0