3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $length = 10; $alpa = "abcdefghijklmnopqrstuvwxyz";$alpa.=strtoupper($alpa); $alpa.="1234567890!@#$%^&*()-=_+";$alpa=str_split($alpa); $pass=""; foreach($alpa as $a){ $pass.=str_repeat($a,floor(sqrt(max(rand(0,22)-5,0)))); } $alpa = str_split($alpa);shuffle($alpa);$alpa=implode($alpa); $r = random(0,strlen($alpa)-$length); echo substr($alpa,$r,$length);
Output for 7.0.0 - 7.3.1
Warning: str_split() expects parameter 1 to be string, array given in /in/f88bs on line 9 Warning: shuffle() expects parameter 1 to be array, null given in /in/f88bs on line 9 Warning: implode(): Argument must be an array in /in/f88bs on line 9 Fatal error: Uncaught Error: Call to undefined function random() in /in/f88bs:10 Stack trace: #0 {main} thrown in /in/f88bs on line 10
Process exited with code 255.
Output for hhvm-3.11.1 - 3.17.3
Warning: str_split() expects parameter 1 to be string, array given in /in/f88bs on line 9 Warning: Invalid operand type was used: shuffle expects array(s) in /in/f88bs on line 9 Warning: Invalid operand type was used: implode() expects a container as one of the arguments in /in/f88bs on line 9 Fatal error: Uncaught Error: Call to undefined function random() in /in/f88bs:10 Stack trace: #0 {main}
Process exited with code 255.
Output for hhvm-3.10.1
Warning: str_split() expects parameter 1 to be string, array given in /in/f88bs on line 9 Warning: Invalid operand type was used: shuffle expects array(s) in /in/f88bs on line 9 Warning: Invalid operand type was used: implode() expects a container as one of the arguments in /in/f88bs on line 9 Fatal error: Call to undefined function random() in /in/f88bs on line 10
Process exited with code 255.
Output for 5.2.5 - 5.6.30
Warning: str_split() expects parameter 1 to be string, array given in /in/f88bs on line 9 Warning: shuffle() expects parameter 1 to be array, null given in /in/f88bs on line 9 Warning: implode(): Argument must be an array in /in/f88bs on line 9 Fatal error: Call to undefined function random() in /in/f88bs on line 10
Process exited with code 255.
Output for 5.0.0 - 5.2.4
Warning: str_split() expects parameter 1 to be string, array given in /in/f88bs on line 9 Warning: shuffle() expects parameter 1 to be array, null given in /in/f88bs on line 9 Warning: implode(): Argument to implode must be an array. in /in/f88bs on line 9 Fatal error: Call to undefined function random() in /in/f88bs on line 10
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: str_split() in /in/f88bs on line 4
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: str_split() in /in/f88bs on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: str_split() in /in/f88bs on line 4