- uniqid: documentation ( source)
- usleep: documentation ( source)
<?php
for ($x = 1; $x <= 10; $x++) {
$mykey = "\x00" . uniqid();
$var = array();
$var[$mykey] = TRUE;
foreach($var as $key => $val)
{
if ($key === $mykey) {
echo 'You got it right' . PHP_EOL;
} else {
echo 'You got it wrong' . PHP_EOL;
}
}
usleep(10);
}