Hi,
I've spent some time thinking about simple FFI for PHP, and finally, borrowed most ideas from LuaJIT. This is an initial PoC. It was tested on Linux only. https://github.com/dstogov/php-ffi I would appreciate review, comments and ideas about missing features and functionality. Thanks. Dmitry.