php 自定义验证码函数的问题
请教各位一个问题:
php 自定义验证码函数
function random_text($count, $rm_similar = false)
{
$chars = array_flip(array_merge(range(0, 9), range('A', 'Z')));
if ($rm_similar)
{
unset($chars[0], $chars[1], $chars[2], $chars[5], $chars[8],
$chars['B'], $chars['I'], $chars['O'], $chars['Q'],
$chars['S'], $chars['U'], $chars['V'], $chars['Z']);
}
for ($i = 0, $text = ''; $i {
$text .= array_rand($chars);
}
return $text;
}
?>
这段代码是什么作用了,$chars[5]这些是啥意思:unset($chars[0], $chars[1], $chars[2], $chars[5], $chars[8],
$chars['B'], $chars['I'], $chars['O'], $chars['Q'],
$chars['S'], $chars['U'], $chars['V'], $chars['Z']);
这个函数调用的话,怎么调用了,给个例子。