What are some best practices for handling date and time formatting in PHP, especially when dealing with internationalization?

When handling date and time formatting in PHP, especially for internationalization, it is best to use the `strftime` function along with setting the appropriate locale. This allows for the formatting of dates and times based on the user's preferred language and region settings. By setting the locale, you ensure that the date and time formats are displayed correctly for users from different countries.

// Set the locale to the user's preferred language and region
setlocale(LC_TIME, 'en_US.UTF-8');

// Format the current date and time according to the locale
echo strftime('%A, %B %d, %Y %H:%M:%S');