arshidkv12/zig-php
PHP extension written in Zig
This project provides a skeleton for building a PHP extension written in Zig. The goal of this project is to leverage Zig's performance and safety features within the PHP ecosystem. This guide will walk you through how to build and test the extension.
phpize
).phpize
and ./configure
.sudo apt-get install php-dev make autoconf
# Or for macOS using Homebrew
brew install autoconf make php
git clone https://github.com/arshidkv12/zig-php.git
cd zig-php
To build it:
zig build
phpize
./configure
make
To test it:
php -d extension=./modules/my_php_extension.so -r "echo hello_world();"
Should output:
Hello from ZIG!