What are the best practices for calling functions to output text in PHP?

When calling functions to output text in PHP, it is important to use the correct function based on the desired output. For plain text output, use `echo` or `print`. For HTML output, use `echo` or `print` as well, but ensure proper HTML formatting within the function. It is also good practice to separate PHP logic from HTML markup for better code readability.

// Example of using echo to output plain text
echo "Hello, World!";

// Example of using echo to output HTML
echo "<h1>Hello, World!</h1>";