Skip to content

Latest commit

 

History

History
26 lines (15 loc) · 715 Bytes

README.md

File metadata and controls

26 lines (15 loc) · 715 Bytes

PHP FFI GO Example

Just tried to call GO functions from PHP via FFI.

How to run?

Make sure you have PHP 7.4 and ffi.enable=true in your php.ini.

Clone this repository.

git clone https://github.com/eislambey/php-ffi-go-example.git

Build libutil.so

go build -o libutil.so -buildmode=c-shared util.go

Run

php example.php

php http_client_example.php

References