- Output for 5.3.0 - 5.3.27, 5.4.0 - 5.4.17
- Parse error: syntax error, unexpected ']' in /in/hBFSF on line 9
Process exited with code 255.
<?php
function randomFilePrefix($length = 10)
{
$chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
$randomstr = "";
for($i = 0; $i < $length; $i++)
{
$randomstr .= $chars[rand(0, count($chars)];
}
return $randomstr;
}
echo randomFilePrefix(10);