Re: [PHP-DEV] [Discussion] FFI in PHP

2017-02-08 Thread Michael Wallner
On 08/02/17 14:54, Michał Brzuchalski wrote: > 2017-02-08 12:51 GMT+01:00 Michael Wallner : > >> >> ``` >> // https://github.com/m6w6/ext-psi#implementations >> function math\add(int $a, int $b) : int { >> let a = intval($a); >> let b = intval($b); >> return to_int(add); >>

Re: [PHP-DEV] [Discussion] FFI in PHP

2017-02-08 Thread Michał Brzuchalski
2017-02-08 12:51 GMT+01:00 Michael Wallner : > On 05/02/17 23:25, Alex Bowers wrote: > > And here is the previous messaging without borked formatting. Sorry > folks. > > > > > > FFI RFC > > == > ... > > Example > > === > > > > Take an example of a rust program that takes two numbers in and giv

Re: [PHP-DEV] [Discussion] FFI in PHP

2017-02-08 Thread Michael Wallner
On 05/02/17 23:25, Alex Bowers wrote: > And here is the previous messaging without borked formatting. Sorry folks. > > > FFI RFC > == ... > Example > === > > Take an example of a rust program that takes two numbers in and gives > you the sum of them. > > ```rust > #[no_mangle] > pub extern

Re: [PHP-DEV] [Discussion] FFI in PHP

2017-02-06 Thread Michael Wallner
On 05/02/17 23:25, Alex Bowers wrote: > And here is the previous messaging without borked formatting. Sorry folks. > > > FFI RFC > == > > There are many languages that support an FFI implementation. > > NodeJS > Python > C++ > Ruby > > FFI allows you to call a native C function without req

[PHP-DEV] [Discussion] FFI in PHP

2017-02-05 Thread Alex Bowers
Hello All, I'd like to start a discussion around an FFI RFC FFI RFC == There are many languages that support an FFI implementation. NodeJS Python C++ Ruby FFI allows you to call a native C function without requiring the boilerplate of an extension to be written. There are several benefits to