3v4l.org

run code in 300+ PHP versions simultaneously
<?php $chars="qazxswedcvfrtgbnhyujmkiolp1234567890QAZXSWEDCVFRTGBNHYUJMKIOLP";$max=8;$size=StrLen($chars)-1;$password=null; while($max--) echo $passwordgen=$chars[rand(0,$size)];

preferences:
33.34 ms | 402 KiB | 5 Q