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

2017-05-31 Thread ilija . tovilo
I think it’s worth noting that the people most excited about arrow functions are probably the ones with a more functional approach. Those kinds of side effects are usually avoided. I also have nothing against capturing by reference. Given the last example: fn($item) => $array[] = $item All you

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

2017-05-31 Thread Levi Morrison
> I can’t think of a scenario where capturing by reference would be helpful in > a single line closure. function($item) use($array) { return $array[] = $item; } It's actually one of the first closures I discovered in the wild when looking for closures that would be candidates for

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

2017-05-31 Thread ilija . tovilo
My preferences: 1, 3, 4, 5, (big void),  2. I actually like 4 the most but I get that that might not be practical if it leads to unexpected behaviour. I can’t think of a scenario where capturing by reference would be helpful in a single line closure. 5 just adds additional complexity with no add

[PHP-DEV] GOOD Benchmark Results for PHP Master 2017-05-30

2017-05-31 Thread lp_benchmark_robot
Results for project PHP master, build date 2017-05-30 19:23:40-07:00 commit: 32200e0 previous commit:37a16a3 revision date: 2017-05-31 02:14:17+03: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] [RFC][Post-Discussion]: E_WARNING when using array-index on non valid container

2017-05-31 Thread David Walker
On Wed, May 31, 2017 at 10:16 AM Dan Ackroyd wrote: > Hi David, > > On 11 January 2017 at 15:42, David Walker wrote: > > Joe had requested renewed discussion on the accepted RFC[1] and my > proposed > > PR[2] be brought forward again for implementation discussion, and to come > > up with a resol

Re: [PHP-DEV] [RFC][Post-Discussion]: E_WARNING when using array-index on non valid container

2017-05-31 Thread li...@rhsoft.net
Am 31.05.2017 um 18:16 schrieb Dan Ackroyd: On 11 January 2017 at 15:42, David Walker wrote: Joe had requested renewed discussion on the accepted RFC[1] and my proposed PR[2] be brought forward again for implementation discussion, and to come up with a resolution. Any thoughts on a better im

Re: [PHP-DEV] [RFC][Post-Discussion]: E_WARNING when using array-index on non valid container

2017-05-31 Thread Dan Ackroyd
Hi David, On 11 January 2017 at 15:42, David Walker wrote: > Joe had requested renewed discussion on the accepted RFC[1] and my proposed > PR[2] be brought forward again for implementation discussion, and to come > up with a resolution. > > Any > thoughts on a better implementation, or other use

[PHP-DEV] Re: [PHP-CVS] com php-src: Exclude warm-up requests from callgrind profile.: acinclude.m4 configure.ac sapi/cgi/cgi_main.c

2017-05-31 Thread Rasmus Lerdorf
This looks interesting. So you build against Valgrind and run php-cgi -T 5,1000 or something like that? What is your normal command line to do one of these callgrind runs?

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

2017-05-31 Thread Rowan Collins
On 31 May 2017 14:48:03 BST, Levi Morrison wrote: >On Wed, May 31, 2017 at 7:36 AM, Rowan Collins > wrote: >> I was just pondering alternative approaches to stop the => token >being ambiguous, and wondered if surrounding the whole expression with >braces could work: >> >> { => $bound * 2 } >> { $a

[PHP-DEV] Testing RFC

2017-05-31 Thread Raphaël Huchet
Hi, My name is Raphaël. I'm testing an idea before sending (with your help) a RFC. Thank for your feedback! This is a well-known PHP message: Notice: Undefined index: id in /xxx/yyy on line 5 Now this is a code example I have seen several times: $foos = get_foos(); $bar = get_bar(); foreach(

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

2017-05-31 Thread Levi Morrison
On Wed, May 31, 2017 at 7:36 AM, Rowan Collins wrote: > On 30 May 2017 18:58:14 BST, Levi Morrison wrote: >>Internals, >> >>The previous discussion thread has died down significantly and so I'd >>like to start a new one to refocus. This message has some redundant >>information by design so people

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

2017-05-31 Thread Rowan Collins
On 30 May 2017 18:58:14 BST, Levi Morrison wrote: >Internals, > >The previous discussion thread has died down significantly and so I'd >like to start a new one to refocus. This message has some redundant >information by design so people don't have to reference the other >thread so much. > >Based o

Re: [PHP-DEV] Class Naming in Core

2017-05-31 Thread Rowan Collins
On 31 May 2017 10:26:06 BST, Tony Marston wrote: >wrote in message >news:86dba466-a764-522b-6990-39fd7668a...@fleshgrinder.com... >I should point out that snake_case was the universal standard decades >before >some people switched to CamelCase. [citation needed] Lisp, for instance, uses hyphen

[PHP-DEV] [RFC] Add openssl_pkcs7_read and extend openssl_pkcs7_verify

2017-05-31 Thread Jelle van der Waa
I would like to propose the addition of openssl_pkcs7_read and extending openssl_pkcs7_verify to also return a PKCS7 structure. The reasoning for the addition of these functions is the requirement at work to obtain the CA certificates usually send along with a signed email. The CA certificates are

Re: [PHP-DEV] Class Naming in Core

2017-05-31 Thread Tony Marston
wrote in message news:86dba466-a764-522b-6990-39fd7668a...@fleshgrinder.com... Hey Stas! On 5/30/2017 1:00 AM, Stanislav Malyshev wrote: Hi! People are complaining over at Reddit [1] Isn't it what Reddit is for? ;) I guess it is. ;) I know that this is probably a topic nobody cares mu

Re: [PHP-DEV] Re: Class Naming in Core

2017-05-31 Thread Tony Marston
wrote in message news:b1ab1858-8ed9-802b-85a6-fe1b458a4...@fleshgrinder.com... @Tony: exactly what Rowan said. We will not change a single line of code, and nobody will be forced to do anything. **UNLESS** the code is meant to become part of the core of PHP. In that case it must follow the rules

Re: [PHP-DEV] Discussion about zip extension and bundled libzip

2017-05-31 Thread Remi Collet
Le 10/04/2017 à 17:35, Anatol Belski a écrit : > So either the bundled lib could be removed for 7.2, or kept without change > and removed in 7.3, thus providing a migration buffer for anyone affected. I just add a configure warning about bundled library being deprecated. I plan to drop it after