finds.dev← search

// the find

mgdm/Mosquitto-PHP

★ 541 · C · BSD-3-Clause · updated Oct 2023

A wrapper for the Eclipse Mosquitto™ MQTT client library for PHP.

A PHP extension written in C that wraps libmosquitto, giving PHP scripts access to MQTT pub/sub. It exposes the callback-based async API of libmosquitto fairly directly, so you can publish and subscribe from PHP with real QoS guarantees rather than a homebrew TCP hack.

Thin wrapper that stays close to the libmosquitto API, so the official Mosquitto docs remain useful. TLS support is included — PSK, certificate-based, and insecure modes all covered. Test coverage is surprisingly thorough for a C extension, with .phpt files for nearly every method. PECL distribution means installation is one command if you already have libmosquitto headers.

Dead project — last commit was 2023, Travis CI badge (not GitHub Actions), and the README still calls out PHP 7 support as noteworthy, which tells you how long it's been coasting. PHP-based MQTT in long-running processes is awkward: you need to call loop() manually or use loopForever(), which blocks the process entirely. No Windows support and no plan for it. If libmosquitto ships a breaking API change, there's no indication anyone is watching.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →