What are some best practices for utilizing <<<ABC in PHP scripts effectively?

Issue: When utilizing <<<ABC in PHP scripts to create a heredoc block, it is important to ensure proper formatting and escaping of variables within the block to avoid syntax errors. Code snippet:

$name = &quot;John&quot;;
$email = &quot;john@example.com&quot;;

// Utilizing &lt;&lt;&lt;ABC to create a heredoc block
$message = &lt;&lt;&lt;EOD
Hello $name,
Thank you for your inquiry. 
Please feel free to contact us at $email for any further assistance.
EOD;

echo $message;