Skip to content
Sample PHP & C programs to understand how PHP-FFI works
PHP C Go Makefile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci
src
test
.gitignore
LICENSE
Makefile
README.md
composer.json
composer.lock
phpunit.xml

README.md

PHP-FFI samples

CircleCI

Requirements

  • PHP 7.4 with FFI enabled
  • go 1.3 or higher
  • gcc

how to check

checkout this repository

$ make
$ composer install
$ ./vendor/bin/phpunit

PHP-FFI with C

  • src/lib/sample.c
  • src/ArgumentsampleC

PHP-FFI with Go

Basically, use c code as interface to prevent seg fault.

  • src/lib/go-sample.c
  • src/ArgumentsampleGo
You can’t perform that action at this time.