Re: uniqid() and repetition of numbers generated

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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()



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux