In this workshop you will learn how to communicate with external libraries through PHP FFI and how to do exactly the same with PHP extension written in pure C. Together we will overcome common pitfalls and discover when we should write an extension and when FFI.
At the end of workshop you will how to:
- Call C code from PHP without the necessity of writing an extension.
- Create simple PHP extensions in C.
- Distinguish when to use FFI and when to write extensions.
You will need Docker and Docker compose to get started.
docker-compose run cli