What are the potential pitfalls of using extract() function in PHP?

Using the extract() function in PHP can lead to potential security vulnerabilities, as it can overwrite existing variables and make it difficult to track the source of variables. To avoid these pitfalls, it is recommended to manually assign variables from the $_POST or $_GET superglobals instead of using extract().

// Avoid using extract() function to prevent potential security vulnerabilities
$name = $_POST['name'];
$email = $_POST['email'];
$age = $_POST['age'];