Re: [PHP-DEV] A Standard PHAR library included with PHP?

2020-05-08 Thread Ben Ramsey
> On May 8, 2020, at 15:10, CHU Zhaowei wrote: > > This idea has been brought up during the RFC for preloading. I think it's a > good idea because it will make the c part smaller, and reduce the cost of > maintenance. The question is, where should we start with? the existing > functions in C

Re: [PHP-DEV] OSI approval for PHP 3.01 license

2020-05-08 Thread Ben Ramsey
> On Mar 5, 2020, at 08:13, Ben Ramsey wrote: > > >> On Mar 4, 2020, at 11:59, Derick Rethans wrote: >> >> On Wed, 4 Mar 2020, Ben Ramsey wrote: >> On Mar 4, 2020, at 11:26, Stanislav Malyshev wrote: Hi! > Does anyone here remember why the changes to the license wh

Re: [PHP-DEV] [RFC] Keep type of reference params

2020-05-08 Thread Bob Weinand
> Am 04.05.2020 um 10:53 schrieb Manuel Canga : > > Hi internals, > > > > I would like to present a possible new RFC( "keep type of reference params" ) > for your > > consideration. > > > > Firstly, an example: > > > > ``` > > > > > function my_array_shift( array & $array ) { > >

RE: [PHP-DEV] Update coding standards wrt. C99?

2020-05-08 Thread CHU Zhaowei
> IMO, mixing variables and codes are always not a good practice I think it depends. For example, modern languages recommend to declare i inside the for loop block instead of in the function block. -Original Message- From: Xinchen Hui Sent: Wednesday, May 6, 2020 6:20 PM To: Christoph

RE: [PHP-DEV] A Standard PHAR library included with PHP?

2020-05-08 Thread CHU Zhaowei
This idea has been brought up during the RFC for preloading. I think it's a good idea because it will make the c part smaller, and reduce the cost of maintenance. The question is, where should we start with? the existing functions in C work well, why should we put effect to convert them back t

RE: [PHP-DEV] [RFC] <> Attribute

2020-05-08 Thread CHU Zhaowei
Hi Benjamin, Thanks for the RFC to bring real cases of attribute into the core. Here are some questions from my side: 1. what's the use case for deprecation against parameters? This feature is really not useful IMO. For example, ` function test2(<> $value) {}` is not only deprecating the `$val

Re: [PHP-DEV] [RFC] Parameter Blocks (vs. Constructor Property Promotion and Named Parameters)

2020-05-08 Thread Larry Garfield
On Fri, May 8, 2020, at 1:04 PM, Rowan Tommins wrote: > On 08/05/2020 02:32, Mike Schinkel wrote: > > 8. I believe this alternate syntax addresses Michal Bruzuchalski's and > > Larry Garfield's concerns... > > 10. Nikita claims there is a "line" to be crossed when property > > declarations have

Re: [PHP-DEV] [RFC] Parameter Blocks (vs. Constructor Property Promotion and Named Parameters)

2020-05-08 Thread Rowan Tommins
On 08/05/2020 02:32, Mike Schinkel wrote: 1. The proposal on the table for Named Parameters effectively converts all parameters names into public aspects of the their function's API. Yes, an opt-in version of named parameters might be useful. However, I'm not immediately convinced it should s

Re: [PHP-DEV] [RFC] Parameter Blocks (vs. Constructor Property Promotion and Named Parameters)

2020-05-08 Thread Rowan Tommins
On 08/05/2020 14:44, Dan Ackroyd wrote: Mike, It's nice that you want to contribute to PHP. But trying to brainstorm ideas over email is not productive. Hi Dan, I appreciate that you, too, want to make PHP better, as a language and as a project; but just about everything in this e-mail is wr

Re: [PHP-DEV] A Standard PHAR library included with PHP?

2020-05-08 Thread Mike Schinkel
> On May 7, 2020, at 10:38 PM, Stanislav Malyshev wrote: > >> One of the primary reasons for many of us — or at least me — to want >> more things in core is not listed above, and that reason is: >> >> - Standardization > > Core and standardization are completely different things. I agree that

Re: [PHP-DEV] [RFC] Parameter Blocks (vs. Constructor Property Promotion and Named Parameters)

2020-05-08 Thread Dan Ackroyd
On Wed, 6 May 2020 at 20:49, Mike Schinkel wrote: > > I am rather concerned about Mike, It's nice that you want to contribute to PHP. But trying to brainstorm ideas over email is not productive. Spending your time helping get the manual more up-to-date would be far more beneficial than throwing

Re: [PHP-DEV] [RFC] Keep type of reference params

2020-05-08 Thread Levi Morrison via internals
I think changing reference is a bad idea, even if it's behind some sort of declare or ini setting or what-have-you. I do support `inout`, which has similar high-level outcomes: the current value is fed in, and when the function returns it has a new value. I think we should use `&` at the call site

Re: [PHP-DEV] [RFC] Keep type of reference params

2020-05-08 Thread Dan Ackroyd
On Fri, 8 May 2020 at 07:49, Manuel Canga wrote: > > What is your opinion ? Do you see it useful ? I can see the need; I strongly dislike the idea of using references for this. What you're describing is a form of 'out parameters' which have been mentioned a few times before on this list. I've m

Re: [PHP-DEV] [RFC] Keep type of reference params

2020-05-08 Thread G. P. B.
On Fri, 8 May 2020 at 13:04, Thomas Gutbier wrote: > Am 08.05.2020 um 12:37 schrieb G. P. B.: > > I think everyone can agree this is useful. But the issue here is the > > implementation. Because from what I know PHP's references are aspecial > > kind of pain in the engine. > > > > That's why the

Re: [PHP-DEV] [RFC] Keep type of reference params

2020-05-08 Thread Thomas Gutbier
Am 08.05.2020 um 12:37 schrieb G. P. B.: I think everyone can agree this is useful. But the issue here is the implementation. Because from what I know PHP's references are aspecial kind of pain in the engine. That's why the common wisdom is to use references in PHP as least as possible. And IIRC

Re: [PHP-DEV] [RFC] Keep type of reference params

2020-05-08 Thread G. P. B.
On Mon, 4 May 2020 at 10:54, Manuel Canga wrote: > Hi internals, > I would like to present a possible new RFC( "keep type of reference > params" ) for your > consideration. > [...] > The result of this code is a warning( in count line ) because of $array is > a string. > > However, I think it sho