Re: uniqid() and repetition of numbers generated

From: Date: Fri, 13 Nov 2009 04:30:40 +0000
Subject: Re: uniqid() and repetition of numbers generated
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-299807@lists.php.net to get a copy of this message
Here's part of the confusion: If you were to express the number of microseconds since 1970 in a decimal number, it would indeed take 16 digits. But uniqid() returns a /13 character string/, not a 13 digit number. The string is actually a hexadecimal number (and thus can express a greater range of values than a decimal number within those 13 characters). -John
Ahh! The moment when the penny drops. I was looking at the result as a number, not a string. Solution to problem = use uniqid()

« previous php.general (#299807) next »