What are the potential risks of using @new mysqli() to suppress error messages in PHP?

Using @new mysqli() to suppress error messages in PHP can lead to potential risks as it hides any errors or warnings that may occur during the database connection process. This can make it difficult to troubleshoot and debug any issues that may arise. It is better to handle errors properly by using error handling techniques such as try-catch blocks or checking for errors after the database connection is established.

// Proper error handling when establishing a database connection
$mysqli = new mysqli("localhost", "username", "password", "database");

if ($mysqli->connect_error) {
    die("Connection failed: " . $mysqli->connect_error);
}