$conn=new PDO("mysql:host=$host;dbname=$dbname",$user,$pass);
// If this is your connection then you have to assign null
// to your connection variable as follows:
$conn=null;
// By this way you can close connection in PDO.
$pdo = null;
$this->connection = new PDO();
$this->connection->query('KILL CONNECTION_ID()');
$this->connection = null;