finds.dev

mgdm/Mosquitto-PHP

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

View on GitHub

★ 541CBSD-3-Clauseupdated Oct 2023

// the take

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.

We read the README, the directory tree and a key source file in July 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
541
Forks
148
Language
C
License
BSD-3-Clause
Last commit
3 Oct 2023

// nearby

If Mosquitto-PHP isn't quite it.

All repos →