3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = 'აბგდევზთიკლმნოპჟრსტუფქღყშჩცძწჭხჯჰ'; $alphabet_length = strlen($a); $random = openssl_random_pseudo_bytes($len); $password = ''; $len = 8; for ($i = 0; $i < $len; ++$i) { $password .= $alphabet[ord($random[$i]) % $alphabet_length]; } var_dump($password);
Output for 5.4.15 - 7.1.7
Notice: Undefined variable: len in /in/mrrkj on line 4 Notice: Undefined variable: alphabet in /in/mrrkj on line 8 Notice: Undefined variable: alphabet in /in/mrrkj on line 8 Notice: Undefined variable: alphabet in /in/mrrkj on line 8 Notice: Undefined variable: alphabet in /in/mrrkj on line 8 Notice: Undefined variable: alphabet in /in/mrrkj on line 8 Notice: Undefined variable: alphabet in /in/mrrkj on line 8 Notice: Undefined variable: alphabet in /in/mrrkj on line 8 Notice: Undefined variable: alphabet in /in/mrrkj on line 8 string(0) ""
Output for 5.0.0 - 5.4.14
Fatal error: Call to undefined function openssl_random_pseudo_bytes() in /in/mrrkj on line 4
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: openssl_random_pseudo_bytes() in /in/mrrkj on line 4
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: openssl_random_pseudo_bytes() in /in/mrrkj on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: openssl_random_pseudo_bytes() in /in/mrrkj on line 4