Skip to content

Latest commit

 

History

History
54 lines (43 loc) · 902 Bytes

README.md

File metadata and controls

54 lines (43 loc) · 902 Bytes

Swoole Logo

Build Status License

C++ wrapper for Zend API

Requirements

  • PHP 8.0 or later
  • Linux/MacOS/Windows
  • GCC 4.8 or later
  • Composer

Build phpx (bin)

./build.sh
sudo cp bin/phpx /usr/local/bin

Build libphpx.so

cmake .
make -j 4
sudo make install
sudo ldconfig

Create Project

phpx create cpp_ext

Generate ArgInfo & Function Entires

php bin/gen_stub.php your_stub_dir

Build extension

cd examples/cpp_ext
phpx build -v
sudo phpx install

Load your extension

Edit php.ini, add extension=cpp_ext.so

Run

php echo.php