Are there any best practices for verifying ICQ numbers using PHP?

When verifying ICQ numbers using PHP, a common best practice is to use regular expressions to validate the format of the ICQ number. This can help ensure that the input follows the correct pattern of numbers and is in the expected format. Additionally, you can also check the length of the ICQ number to make sure it falls within the appropriate range.

function verifyICQNumber($icqNumber) {
    // Regular expression to match ICQ number format (5-9 digits)
    $pattern = '/^\d{5,9}$/';
    
    if (preg_match($pattern, $icqNumber)) {
        return true;
    } else {
        return false;
    }
}

// Example usage
$icqNumber = "12345";
if (verifyICQNumber($icqNumber)) {
    echo "ICQ number is valid.";
} else {
    echo "ICQ number is invalid.";
}