<?php 

$no1 = rand(1005, 9999);

$validCharacters = "ABCDEFGHIJKLMNOPQRSTUXYVWZ+-*#&@!?";
$validCharNumber = strlen($validCharacters);
 
$index = mt_rand(10, $validCharNumber-1);
$randomCharacter = $validCharacters[$index];
 
$randomCharacter;

$length = 5;
$result = "";
 
for ($i = 0; $i < $length; $i++) {
    $index = mt_rand(0, $validCharNumber-1);
    $result .= $validCharacters[$index];
}

$random_string = $result . $no1 . $randomCharacter;
 ?>