How can inheritance from the mysqli class be utilized to improve the design of a database connection class in PHP?

Inheritance from the mysqli class can be utilized to improve the design of a database connection class in PHP by allowing the database connection class to inherit all the properties and methods of the mysqli class, reducing code duplication and promoting code reusability.

class DatabaseConnection extends mysqli {
    public function __construct($host, $username, $password, $database) {
        parent::__construct($host, $username, $password, $database);
        if ($this->connect_error) {
            die('Connection failed: ' . $this->connect_error);
        }
    }
}

// Example usage
$db = new DatabaseConnection('localhost', 'username', 'password', 'database_name');