The mysqli_get_host_info() function returns a text string containing the host name of the MySQL
server and the type of connection used (e.g., Localhost via UNIX socket or localhost via TCP/IP).
Practical use: With this function, you can quickly find out how your PHP script is connected to the database, which is crucial for optimizing connection speed and security. Look at the example output below: