PHP 8.4.24 Released!

Voting

: zero minus zero?
(Example: nine)

The Note You're Voting On

dzafel at op dot pl
19 years ago
Very, very simple random password generator, without using rand() function:

<?php
function random_password($chars = 8) {
   $letters = 'abcefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890';
   return substr(str_shuffle($letters), 0, $chars);
}
?>

<< Back to user notes page

To Top