PHP - Manual: SAMConnection::__construct
2025-05-17
(PECL sam >= 0.1.0)
SAMConnection::__construct — Creates a new connection to a Messaging Server
Creates a new SAMConnection object.
Example #1 Creating a connection object and connecting to a Messaging Server
<?php
$conn = new SAMConnection();
$conn->connect(SAM_WMQ, array(SAM_HOST => localhost, SAM_PORT => 1414, SAM_BROKER => 'bull'));
?>
官方地址:https://www.php.net/manual/en/samconnection.construct.php