Requirements
- PHP 8.6
- A C compiler (clang on macOS, gcc on Linux) when building from source
The extension supports only the latest stable PHP release. When a new PHP version is released, the next release of the extension requires it and support for the previous version ends. The extension refuses to build below PHP 8.6.
Note: On PHP 8.4 or 8.5, stay on php-resp3 0.2.x.
Install with PIE
pie install webpatser/php-resp3
PIE downloads a prebuilt .so for your PHP build. Prebuilt binaries exist for these combinations, all PHP 8.6:
| Combination | PHP versions |
|---|---|
| linux / x86_64 / glibc, NTS | 8.6 |
| linux / arm64 / glibc, NTS | 8.6 |
| darwin / arm64, NTS | 8.6 |
For any other combination PIE falls back to a local source compile, which needs a C compiler, php-dev and re2c. CI verifies the source build on Ubuntu 24.04 (NTS, x64 and ARM64), Ubuntu 24.04 (ZTS, x64), macOS 15 (NTS, ARM64) and Alpine (musl, x64).
Build from source
phpize./configure --enable-resp3makemake test
The build leaves modules/resp3.so in place. Load it with -d extension:
php -d extension=./modules/resp3.so -r 'echo resp3_version();'
Verify
php -r 'var_dump(extension_loaded("resp3"));'php -r 'echo resp3_version();'
The second command prints the extension version (0.3.0 for this release).
Configuration
The extension registers no php.ini settings. The limits of the parser are constructor arguments, see API reference.