note 72912 deleted from function.rand by felipe

[email protected]
Newsgroups php.notes
Message-ID <[email protected]>
Note Submitter: tahir at sandikkaya dot name dot tr 

----

A single line random string generator.

Since crypt() function generally generates a string of 32 characters that contains some non-alphanumeric characters, my code does not guarantee the length of the random string, but generally speaking, it is efficient up to 24 characters.

substr(preg_replace('/[\/\\\:*?"<>|.$^1]/', '', crypt(time())), 0, 16);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.