What is the best way to display status messages in a PHP script to show progress?

When running a PHP script that performs time-consuming tasks, it's helpful to display status messages to show progress to the user. One way to achieve this is by using the `echo` or `print` functions to output messages at different stages of the script execution. These messages can provide information on what task is currently being performed or indicate when a task has been completed.

// Display status messages to show progress
echo "Task 1 in progress...<br>";
// Perform task 1
echo "Task 1 completed.<br>";

echo "Task 2 in progress...<br>";
// Perform task 2
echo "Task 2 completed.<br>";

echo "All tasks completed successfully.";