<?php
$SQL = new mysqli; // create copy class
# optional
//$SQL -> options(MYSQLI_OPT_INT_AND_FLOAT_NATIVE, 1);
$SQL -> real_connect('127.0.0.1', 'root', 'pass', 'database');
$SQL_Err = $SQL->connect_errno;
if($SQL_Err) // if error
exit('Error');
?>