Are there any specific formatting requirements for the MsgID in a SEPA XML file when using PHP?

When creating a SEPA XML file in PHP, the MsgID (Message Identification) must be a unique identifier for each payment message. It is recommended to use a combination of letters, numbers, and special characters to ensure uniqueness. The MsgID should not exceed 35 characters in length and should not contain any spaces.

// Generate a unique Message Identification (MsgID) for SEPA XML file
$msgId = substr(uniqid(), 0, 35); // Generate a unique identifier
$msgId = preg_replace('/[^A-Za-z0-9]/', '', $msgId); // Remove special characters