title: Fatal error: Class 'Mosquitto\Client' not found
body: <p>I have been trying to publish a subscribe message using MQTT, but whenever I run my script it gives me this error:</p>
  
  <blockquote>
    <p>Fatal error: Class 'Mosquitto\Client' not found in /Applications/XAMPP/xamppfiles/htdocs/Mosquitto-PHP-master/examples/pub.php on line 3</p>
  </blockquote>
  
  <p>This is connection: </p>
  
  <pre><code>$client-&gt;connect("localhost", 1883, 5);
  </code></pre>
  
  <p>I have downloaded code from below:
  <a href="https://github.com/mgdm/Mosquitto-PHP" rel="nofollow noreferrer">https://github.com/mgdm/Mosquitto-PHP</a></p>
  
  <p>I tried to download code using pecl command but it gives me error: </p>
  
  <blockquote>
    <p>No releases available for package "pecl.php.net/Mosquitto" install failed</p>
  </blockquote>
  
  <p>The broker is working fine after firing the command. I got a message in new subscriber terminal - broker is working.</p>
  
  <p>Can anyone let me know what mistake I made?</p>