- uniqid: documentation ( source)
- preg_replace: documentation ( source)
<?php
$mykey = uniqid("\x00");
$mykey = preg_replace('/[a-zA-Z]/', "4", $mykey);
$var[$mykey] = TRUE;
foreach($var as $key => $val)
{
if ($key === $mykey) {
echo 'You got it right';
} else {
echo 'You got it wrong';
}
}