(PECL sam >= 0.1.0)
SAMConnection::disconnect — Disconnects from a Messaging Server
Calling the "disconnect" method on a SAMConnection object disconnects the PHP script from a messaging server. No messages can be sent or received after a connection has been disconnected.
 
   Возвращает TRUE в случае успешного завершения  или FALSE в случае возникновения ошибки.
  
Пример #1 Disconnecting from a Messaging Server
<?php
$conn->disconnect();
?>