How does the choice between new mysqli and mysqli_connect impact the overall performance and scalability of a PHP application?

The choice between using new mysqli and mysqli_connect can impact the overall performance and scalability of a PHP application. The new mysqli object-oriented approach offers more flexibility and features, making it easier to work with databases. However, mysqli_connect is simpler and may be faster for basic database operations. It is important to consider the specific needs of the application and choose the method that best suits those requirements.

// Using new mysqli object-oriented approach
$mysqli = new mysqli("localhost", "username", "password", "database_name");

// Using mysqli_connect function
$mysqli = mysqli_connect("localhost", "username", "password", "database_name");