> 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.
> I would appreciate review, comments and ideas about missing features and
Looks interesting. On a cursory look, couple of thoughts:
- I think all the classes involved should be made non-serializable and
- Does it load shared libraries, or only uses ones already loaded? If
the former, I think there should be a way to unload them at the request
end (even though it might be performance issue, and may be not possible
if persistent resources are involved), otherwise we leak state between
- OTOH, people may want to load a set of persistent definitions from a
config file, etc. - the ffi definition probably won't change much, and
having locked down set of FFI interfaces the rest of the code is using
might be beneficial
- Since this thing is dealing with raw pointers, etc., from PHP code,
there may be a lot of crashes from using this extension in a wrong way.
I wonder which facilities we could provide for helping people to debug
it (for people who aren't super-comfortable using gdb on PHP engine).
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php