3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = 'აბგდევზთიკლმნოპჟრსტუფქღყშჩცძწჭხჯჰ'; $alphabet_length = strlen($alphabet); $password = ''; $len = 8; for ($i = 0; $i < $len; ++$i) { $password .= $alphabet[ord($random[$i]) % $alphabet_length]; } var_dump($password);

preferences:
42.7 ms | 402 KiB | 5 Q