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

2017-02-05 Thread Alex Bowers
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 requiring the boilerplate of an extension to be written. There are s

[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

Re: [PHP-DEV] Fwd: Monotonic Time

2017-02-05 Thread Niklas Keller
I have implemented a `hrtime()` function which allows access to the system's monotonic time in nanoseconds. > > https://github.com/php/php-src/compare/master...kelunik:hrtime Feedback is very welcome. I'm not sure whether we should allow a parameter for the time unit or just let the user do the s

Re: [PHP-DEV] Need help with strange and random bug

2017-02-05 Thread Andrey E Baranov
Nikita Popov at 2017-02-05 21:44 wrote: On Sun, Feb 5, 2017 at 3:03 PM, Andrey E Baranov wrote: Hi all, I have problem, debug is not yet finished, and for now do not can reproduce, problem occurs only in production (after migrate to PHP7). perhaps someone else can help :) PHP 7.0.13 (Ubuntu

Re: [PHP-DEV] [RFC][Discuss] Arrow Functions

2017-02-05 Thread Rowan Collins
On 30/01/2017 17:55, Levi Morrison wrote: Here is an example of an existing closure: function ($x) use ($arr) { return $arr[$x]; } This RFC proposes syntax and semantics to simplify this common usage to: fn($x) => $arr[$x] I think a lot of the disagreements and confus

Re: [PHP-DEV] Need help with strange and random bug

2017-02-05 Thread Nikita Popov
On Sun, Feb 5, 2017 at 3:03 PM, Andrey E Baranov wrote: > Hi all, > > I have problem, debug is not yet finished, and for now do not can > reproduce, problem occurs only in production (after migrate to PHP7). > perhaps someone else can help :) > PHP 7.0.13 (Ubuntu 16.04 package repository), php-fp

[PHP-DEV] Need help with strange and random bug

2017-02-05 Thread Andrey E Baranov
Hi all, I have problem, debug is not yet finished, and for now do not can reproduce, problem occurs only in production (after migrate to PHP7). perhaps someone else can help :) PHP 7.0.13 (Ubuntu 16.04 package repository), php-fpm For simplify: ``` ... Log::debug('1:' . print_r($video, true))

Re: [PHP-DEV] [RFC][Discuss] Arrow Functions

2017-02-05 Thread Rasmus Schultz
I'd strongly prefer a syntax without the introduction of "fn" keyword - e.g. similar to closures in other languages. I also feel that there's a feature missing - something that was possible with closures: $total = 0; $add = function ($value) use (&$total) { $total += $value; }; Per the RFC:

Re: [PHP-DEV] Re: [RFC][Discuss] Arrow Functions

2017-02-05 Thread Tony Marston
"Andrea Faulds" wrote in message news:19.45.38491.677d4...@pb1.pair.com... Hi David, David Rodrigues wrote: Hello folks! I just not understand why "function" should be abbreviated. It's about "how less character better"? I don't see it too much on PHP. I guess that is more simple keep what