public static function getMysqli() { if (self::$mysqli === null) { try { // throw exceptions instead of PHP errors mysqli_report(MYSQLI_REPORT_STRICT); // connect! self::$mysqli = new mysqli("localhost", "user", "mY15463sql", "EvoApi"); } catch (mysqli_sql_exception $error) { throw new mysqli_sql_exception("Unable to connect to mySQL", 0, $error); } } return self::$mysqli; }