Re: Re: rand_str

From: Date: Sun, 05 Aug 2001 02:41:16 +0000
Subject: Re: Re: rand_str
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-62117@lists.php.net to get a copy of this message
is it that much more useful than md5(microtime()) ? ah-oh, you want to be able to specify the set of characters... At 04:28 8/5/2001, Daniel Andersson wrote the following: -------------------------------------------------------------- >sounds useful and cool, me thinks :o) > >/ d > ><jeroen@php.net> wrote in message >news:20010804205438.88378.qmail@pb1.pair.com... >> Hi, >> >> I'm thinking about a new function: [mt_]rand_str >> >> Syntax: >> string [mt_]rand_str(minlen,maxlen[,charlist]); >> >> where charlist is in addcslashes (and now also [l|r]trim) syntax. >> Charlist defaults to 0..9a..zA..Z >> >> >> IMHO, this would be a very useful function. >> >> Any comments? Maybe not min&maxlen, but simply a fixed len? (since >> randomness on the length is ambigious to implement, there are less >> possibilities with shorter strings, which raises some issues). >> >> As an extension, the function could also accept an array as charlist, >> containing small strings, to produce pronouncable strings. >> >> Jeroen >> >> >> >> > > > >-- >PHP Development Mailing List <http://www.php.net/> >To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net >For additional commands, e-mail: php-dev-help@lists.php.net >To contact the list administrators, e-mail: php-list-admin@lists.php.net ------end of quote------ cynic@mail.cz ------------- And the eyes of them both were opened and they saw that their files were world readable and writable, so they chmoded 600 their files. - Book of Installation chapt 3 sec 7

« previous php.dev (#62117) next »