Phpx
C++ wrapper for Zend API
Install / Use
/learn @swoole/PhpxREADME
<h1 align=center>
<img width="400" alt="Swoole Logo" src="logo.png" />
</h1>
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
