What is the recommended method in PHP to clear POST variables after they have been used to prevent script execution on page reload?

When handling form submissions in PHP, it's important to clear POST variables after they have been used to prevent script execution on page reload. This is crucial to prevent unintended actions or duplicate submissions when a user refreshes the page. One common method to achieve this is by using the unset() function to unset the POST variables once they have been processed.

// Process form submission
if ($_SERVER["REQUEST_METHOD"] == "POST") {
    // Handle form data
    
    // Clear POST variables to prevent script execution on page reload
    unset($_POST);
}