Permalink
Browse files

PoC of preloading FFI definitions at PHP startup (incomplete but works)

$ cat example.h

int printf(const char *format, ...);

$ php -dffi.preload=example.h -r 'var_dump(FFI\printf("Hello %s!\n", "World"));'

Hello World!

int(13)
  • Loading branch information...
dstogov committed Apr 26, 2018
1 parent 3579fe0 commit 75cdae7a26406ae75ee27317ddb1981774a81006
Showing with 306 additions and 63 deletions.
  1. +288 −49 ffi.c
  2. +6 −6 ffi.g
  3. +6 −6 ffi_parser.c
  4. +6 −2 php_ffi.h
Oops, something went wrong.

0 comments on commit 75cdae7

Please sign in to comment.