PHP code example of masakielastic / hello-zig
1. Go to this page and download the library: Download masakielastic/hello-zig library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
masakielastic / hello-zig example snippets
bash
pie install masakielastic/hello-zig
php --ri hello_zig
php -r 'echo hello_zig_hello(), PHP_EOL;'
bash
cd ext
phpize
ZIG=/home/masakielastic/.local/zig-dev/zig ./configure --enable-hello-zig
make
php -dextension=modules/hello_zig.so -r 'echo hello_zig_hello(), PHP_EOL;'