[PHP-DEV] Re: PHP 7.1 - should we add a random_str() function?

2015-09-30 Thread Benoit Schildknecht
Hi, Le Wed, 30 Sep 2015 18:15:09 +0200, Scott Arciszewski a écrit: This is probably answerable by a quick yes/no and shouldn't need a ton of bikeshedding, but if that happens anyway I apologize in advance. I think random_bytes() and random_int() are great; they

Re: [PHP-DEV] good example of unserialization fundamentals?

2015-09-30 Thread Sean DuBois
On Wed, Sep 30, 2015 at 01:39:26PM -0700, j adams wrote: > I have completed a first draft of serialization functionality which is > intended to be an updated to amfext. It's on github[0] if anyone is > interested. I would now like to write all the unserialization routines and > would like some

[PHP-DEV] Re: Windows OpCache bug fix

2015-09-30 Thread Dmitry Stogov
Hi Matt, Thanks for looking into the problem, but I afraid that the proposed solution won't solve the problem completely, but may introduce new problems. At first, we might to reserve N times more memory. Then different SHM segments might contain different data. opcache_reset(),

[PHP-DEV] good example of unserialization fundamentals?

2015-09-30 Thread j adams
I have completed a first draft of serialization functionality which is intended to be an updated to amfext. It's on github[0] if anyone is interested. I would now like to write all the unserialization routines and would like some suggestions from experienced php devs. I've been reading Sara

Re: [PHP-DEV] good example of unserialization fundamentals?

2015-09-30 Thread j adams
Thanks for your response. I do follow the concept of macros (and my IDE expands them for me if I need), however, I just want to confirm that it's OK to be using these in a *recursive function*? I'm aware from S. Golemon's book that these (deeply nested) macros also have the effect of incrementing

[PHP-DEV] Benchmark Results for PHP Master 2015-09-30

2015-09-30 Thread lp_benchmark_robot
Results for project php-src-nightly, build date 2015-09-30 05:12:52+03:00 commit: 1dc93f000c3d503abe82f87afcc3a7a2ffb39398 revision_date: 2015-09-30 01:35:50+02:00 environment:Haswell-EP cpu:Intel(R) Xeon(R) CPU E5-2699 v3 @ 2.30GHz 2x18 cores, stepping 2, LLC 45 MB

Re: [PHP-DEV] Arrow function expressions in PHP

2015-09-30 Thread Rowan Collins
Levi Morrison wrote on 29/09/2015 22:55: When you choose the function($x) ~> $x * 2 (or with ==> or => >operator), you end up saving around 5 or 6 characters from the "long >declaration", ending up with "not-so-short closures" instead. You save >a little bit more if you have the implicit "use",

Re: [PHP-DEV] Arrow function expressions in PHP

2015-09-30 Thread Bob Weinand
> Am 26.9.2015 um 18:17 schrieb Levi Morrison : > > (Email in gist format: > https://gist.github.com/morrisonlevi/fa7984c04ff176b5a87c) > > In EcmaScript 2015 (ES6) the expression `(x) => x * 2` means to create > an anonymous function with one parameter `x` that will return `x *

Re: [PHP-DEV] Arrow function expressions in PHP

2015-09-30 Thread Levi Morrison
On Wed, Sep 30, 2015 at 8:45 PM, Bishop Bettini wrote: > On Sat, Sep 26, 2015 at 1:07 PM, Rowan Collins > wrote: >> >> On 26/09/2015 17:17, Levi Morrison wrote: >>> >>> What concerns do you have about `fn($x) => $x * 2` or `function($x) => >>> $x * 2`? I

Re: [PHP-DEV] Arrow function expressions in PHP

2015-09-30 Thread Bishop Bettini
On Sat, Sep 26, 2015 at 1:07 PM, Rowan Collins wrote: > On 26/09/2015 17:17, Levi Morrison wrote: > >> What concerns do you have about `fn($x) => $x * 2` or `function($x) => >> $x * 2`? I will be writing a proper RFC later but I wanted to get >> discussion going now. >>

Re: [PHP-DEV] Arrow function expressions in PHP

2015-09-30 Thread Marcio Almada
Hi, 2015-09-30 8:10 GMT-03:00 Rowan Collins : > Levi Morrison wrote on 29/09/2015 22:55: >>> >>> When you choose the function($x) ~> $x * 2 (or with ==> or => >>> >operator), you end up saving around 5 or 6 characters from the "long >>> >declaration", ending up with

Re: [PHP-DEV] Arrow function expressions in PHP

2015-09-30 Thread Rowan Collins
Marcio Almada wrote on 30/09/2015 15:49: That's not to say that automatic capture is an absolute blocker, but I think >"the internals community is divided on it" is a reasonable summary. > That's the part I couldn't comprehend in the discussion. Auto import is basically the most interesting

[PHP-DEV] PHP 7.1 - should we add a random_str() function?

2015-09-30 Thread Scott Arciszewski
This is probably answerable by a quick yes/no and shouldn't need a ton of bikeshedding, but if that happens anyway I apologize in advance. I think random_bytes() and random_int() are great; they provide a much-needed building block in PHP 7.0. However, I do worry a bit that the most common use