Re: [PHP-DEV] Revisit trailing commas in function call parameters?

2015-06-17 Thread Yasuo Ohgaki
Hi Christian, On Wed, Jun 17, 2015 at 9:05 PM, Christian Schneider wrote: > Hi there, > now that syntax for variadic functions was added I quickly wanted to ask > whether allowing trailing commas for function calls could be reconsidered. > > It is a very small change to the language allowing som

Re: [PHP-DEV] RFC - making the Exception class abstract

2015-06-17 Thread Sebastian Bergmann
Am 17.06.2015 um 23:30 schrieb Anthony Ferrara: > Instead, I think we should solve the problem with education. Perhaps > the documentation can better detail out why devs shouldn't directly > throw exception but instead use typed exceptions...? I remember "all hell breaking lose" when I disallowed

Re: [PHP-DEV] The most efficicient way to pick key,value from a large array

2015-06-17 Thread Ryan Pallas
Use array_intersect_key with array_flip. $pending_pick_key1 = [uid, username]; array_intersect_key($origin_array, array_flip( $pending_pick_key1)); On Jun 17, 2015 7:25 PM, "Netroby" wrote: > Now, we have a large array, contains user profile. > [uid, username, password, email, qq, msn, skype, ad

[PHP-DEV] The most efficicient way to pick key,value from a large array

2015-06-17 Thread Netroby
Now, we have a large array, contains user profile. [uid, username, password, email, qq, msn, skype, address, zipcode, telphone, mobile...] We need to pick information from this big array, and we know the key we want to pick. What's the efficient way ? Is there any function like $pending_pick_

Re: [PHP-DEV] RFC - making the Exception class abstract

2015-06-17 Thread Johannes Schlüter
On Wed, 2015-06-17 at 17:30 -0400, Anthony Ferrara wrote: > Changing the existing Exception class to be abstract would break a > metric ton of code. Simply on that metric alone it would be a hard > sell. I think you'd need an exceptionally strong justification for it, > beyond "using typed exceptio

Re: [PHP-DEV] PHP7 releases vs Windows Sources?

2015-06-17 Thread Christoph Becker
Nikita Popov wrote: > On Wed, Jun 17, 2015 at 12:20 AM, Christoph Becker > wrote: > >> Johannes Schlüter wrote: >> >>> On Tue, 2015-06-16 at 02:02 +0200, Christoph Becker wrote: >>> Fair enough. However, the Windows sources neither contain the generated parser files, because they woul

Re: [PHP-DEV] RFC - making the Exception class abstract

2015-06-17 Thread Anthony Ferrara
Kevin, On Wed, Jun 17, 2015 at 4:41 PM, Kevin Bradwick wrote: > Hello! > > This is my first post to the internals list so please forgive me if I have > not followed the rules precisely! > > I've had an idea to improve how developers use exceptions within PHP. I'd > like to add an RFC but as per t

[PHP-DEV] RFC - making the Exception class abstract

2015-06-17 Thread Kevin Bradwick
Hello! This is my first post to the internals list so please forgive me if I have not followed the rules precisely! I've had an idea to improve how developers use exceptions within PHP. I'd like to add an RFC but as per the instructions on the site , I am sending t

Re: [PHP-DEV] Revisit trailing commas in function call parameters?

2015-06-17 Thread Bishop Bettini
On Wed, Jun 17, 2015 at 12:36 PM, Ferenc Kovacs wrote: > On Wed, Jun 17, 2015 at 2:05 PM, Christian Schneider < > cschn...@cschneid.com> > wrote: > > > Hi there, > > now that syntax for variadic functions was added I quickly wanted to ask > > whether allowing trailing commas for function calls co

Re: [PHP-DEV] Revisit trailing commas in function call parameters?

2015-06-17 Thread Ferenc Kovacs
On Wed, Jun 17, 2015 at 2:05 PM, Christian Schneider wrote: > Hi there, > now that syntax for variadic functions was added I quickly wanted to ask > whether allowing trailing commas for function calls could be reconsidered. > > It is a very small change to the language allowing something like >

Re: [PHP-DEV] Initializer List

2015-06-17 Thread Sebastian B.-Hagensen
Hi, the proposed syntax also clashes with the new return type hints. They don't make sense on construct, but reusing the same syntax for two different things should be avoided if possible. Hack implements a related approach (without most of the c++ guarantees and benefits as it is pure syntactic

Re: [PHP-DEV] Initializer List

2015-06-17 Thread Johannes Schlüter
On Wed, 2015-06-17 at 10:03 +0200, Lorenzo Fontana wrote: > - In C++ using initializer list is used over assignment also for > performance reasons but right now I can't say if this can be achieved in > PHP or not. > > Initializer lists in C++: > http://en.cppreference.com/w/cpp/language/initialize

Re: [PHP-DEV] Re: [PHP-WEBMASTER] RE: [PHP-DEV] PHP7 releases vs Windows Sources?

2015-06-17 Thread Jan Ehrhardt
Pierre Joye in php.internals (Wed, 17 Jun 2015 06:07:14 +0700): >If we do it, we will also need the ability to do independent releases >in case we need to update one of the dependencies (not code change, only >provide updates for one or the other DLLs in case of critical security >issues). YM, lik

[PHP-DEV] Revisit trailing commas in function call parameters?

2015-06-17 Thread Christian Schneider
Hi there, now that syntax for variadic functions was added I quickly wanted to ask whether allowing trailing commas for function calls could be reconsidered. It is a very small change to the language allowing something like my_variadic_function( "foo", "bar

Re: [PHP-DEV] PHP7 releases vs Windows Sources?

2015-06-17 Thread Ferenc Kovacs
On Wed, Jun 17, 2015 at 3:19 AM, Stanislav Malyshev wrote: > Hi! > > > about signing, recently I got a question that somebody couldn't verify > > the tarball signature, because he was trying to verify the extracted > > contents instead of the compressed file. > > he was trying to do that, because

[PHP-DEV] Initializer List

2015-06-17 Thread Lorenzo Fontana
Hi All! As stated in the Wiki RFC HowTo section I'm here to measure the reaction about my proposal. I would like to propose an RFC and then implement initializer list for constructors in PHP. Being a C++ developer I find this feature very useful and these are my considerations: - This will prov