getHost() . (($cred->getPort() !== '') ? ";port=" . $cred->getPort() : '') . ";dbname=" . $cred->getDBName(), $cred->getLogin(), $cred->getPassword() ); // we destroy $cred as quickly as possible $cred = null; } catch (PDOException $e) { // we destroy $cred as quickly as possible $cred = null; die(json_encode(array("Result-Type" => "Error", "Content" => array($e)))); } } }