3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = 'აბგდევზთიკლმნოპჟრსტუფქღყშჩცძწჭხჯჰ'; $alphabet_length = strlen($a); $password = ''; $len = 8; for ($i = 0; $i < $len; ++$i) { $password .= $alphabet[ord($random[$i]) % $alphabet_length]; } var_dump($password);
Output for 5.0.4 - 7.1.0
Notice: Undefined variable: random in /in/WDl0g on line 7 Notice: Undefined variable: alphabet in /in/WDl0g on line 7 Notice: Undefined variable: random in /in/WDl0g on line 7 Notice: Undefined variable: alphabet in /in/WDl0g on line 7 Notice: Undefined variable: random in /in/WDl0g on line 7 Notice: Undefined variable: alphabet in /in/WDl0g on line 7 Notice: Undefined variable: random in /in/WDl0g on line 7 Notice: Undefined variable: alphabet in /in/WDl0g on line 7 Notice: Undefined variable: random in /in/WDl0g on line 7 Notice: Undefined variable: alphabet in /in/WDl0g on line 7 Notice: Undefined variable: random in /in/WDl0g on line 7 Notice: Undefined variable: alphabet in /in/WDl0g on line 7 Notice: Undefined variable: random in /in/WDl0g on line 7 Notice: Undefined variable: alphabet in /in/WDl0g on line 7 Notice: Undefined variable: random in /in/WDl0g on line 7 Notice: Undefined variable: alphabet in /in/WDl0g on line 7 string(0) ""
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: random in /in/WDl0g on line 7 Notice: Undefined variable: alphabet in /in/WDl0g on line 7 Notice: Undefined variable: random in /in/WDl0g on line 7 Notice: Undefined variable: alphabet in /in/WDl0g on line 7 Notice: Undefined variable: random in /in/WDl0g on line 7 Notice: Undefined variable: alphabet in /in/WDl0g on line 7 Notice: Undefined variable: random in /in/WDl0g on line 7 Notice: Undefined variable: alphabet in /in/WDl0g on line 7 Notice: Undefined variable: random in /in/WDl0g on line 7 Notice: Undefined variable: alphabet in /in/WDl0g on line 7 Notice: Undefined variable: random in /in/WDl0g on line 7 Notice: Undefined variable: alphabet in /in/WDl0g on line 7 Notice: Undefined variable: random in /in/WDl0g on line 7 Notice: Undefined variable: alphabet in /in/WDl0g on line 7 Notice: Undefined variable: random in /in/WDl0g on line 7 Notice: Undefined variable: alphabet in /in/WDl0g on line 7 string(0) ""