swoole/phpx

C++ wrapper for Zend API

Maintainers

Package info

github.com/swoole/phpx

Language:C++

pkg:composer/swoole/phpx

Statistics

Installs: 14

Dependents: 1

Suggesters: 0

Stars: 847

Open Issues: 0

v2.1.0 2026-03-27 03:36 UTC

This package is auto-updated.

Last update: 2026-04-03 11:58:19 UTC


README

Swoole Logo

Twitter Discord Build Status License Latest Release Codecov

C++ wrapper for Zend API

Requirements

  • PHP 8.1 or later
  • Linux/macOS/Windows
  • GCC 4.8 or later
  • Composer

Build libphpx.so

cmake .
make -j 4
sudo make install
sudo ldconfig

Create Project

# extension
composer create-project swoole/phpx-ext test

Generate ArgInfo & Function Entires

php vendor/swoole/phpx/bin/gen_stub.php your_stub_dir

Build extension

cd test
cmake .
make -j 4
make install

Load your extension

Edit php.ini, add extension=test.so

Run

php echo.php