3v4l.org

run code in 300+ PHP versions simultaneously
<?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 5.4.0 - 5.4.21, 5.5.0 - 5.5.5
Parse error: syntax error, unexpected end of file, expecting ',' or ';' in /in/UJ5ZQ on line 11
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected $end, expecting ',' or ';' in /in/UJ5ZQ on line 11
Process exited with code 255.

preferences:
199.91 ms | 1395 KiB | 63 Q