note 33018 added to function.rand

From: Date: Fri, 13 Jun 2003 20:27:53 +0000
Subject: note 33018 added to function.rand
Groups: php.notes 
Request: Send a blank email to php-notes+get-50307@lists.php.net to get a copy of this message
TO THE EDITOR: In my previous post you commented that multiple itterations would eventually produce the same result and thus uniqid() is a better function for the purpose. I would agree with you on the basis that we were to be using the entire string of uniqid. We are, however, using a small amount of the string - 5 chars, for example - and thus for your comment to be true, you'd have to imply that a uniqid is so unique that not even the same 5 characters are repeated in the same sequence, ever. For this to be true the string would be limited to a substantially smaller number of possabilities, and eliminating the value of its purpose. I do not think it's appropriate to suggest my function is sub-standard to uniqid in regards to its -actual- purpose. Subjecting uniqid to an identical procedure with identical purpose, in my opinion, would be just as if not less effective than the function posted in my article. I hope that you can see my meaning in all of this, and I do understand your reasons for posting what you had posted, I simply disagree that uniqid is more effective when subjected to the same procedure: reducing its size to a specificed amount which is less than it's full length. Thank you for your time and consideration, do what you will with what I've said as I am not placing any expectations on this post or your response, if any. -Scott Roberts ---- Manual Page -- http://www.php.net/manual/en/function.rand.php Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+33018 Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+33018&report=yes Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+33018&report=yes

« previous php.notes (#50307) next »