$prefix = mt_rand();
$captcha_instance-&gt;generate_image( $prefix, $word );