What are some best practices for closing statements and database connections in PHP?

When working with databases in PHP, it is important to always close your database connections and statements to free up resources and prevent memory leaks. To ensure proper closure, you can use the `close()` method for statements and `close()` or `null` for connections.

// Closing a statement
$stmt->close();

// Closing a connection
$conn->close();
// or
$conn = null;