public function __destruct() { // disconnects and rolls back transaction - do not rely on auto-disconnect and rollback! $this->connected && $this->driver->getResource() && $this->disconnect(); }