Re: [PHP-DEV] [RFC] [DISCUSSION] Compact Object Property Assignment

2020-03-21 Thread Jakob Givoni
I just realized that syntax C and D as proposed - without anything to signify end of COPA - become really awkward when writing nested COPA: $foo-> a = 1, b = 2, c = (new Foo)-> a = 3, b = 4,. , ; How do we indicate that the nested block ends and jump back to the

Re: [PHP-DEV] PHP 8.0 Release Manager Selection

2020-03-21 Thread Larry Garfield
On Thu, Mar 19, 2020, at 1:16 PM, Ben Ramsey wrote: > > On Mar 19, 2020, at 10:27, Derick Rethans wrote: > > > > Hi all! > > > > With the first alpha of 8.0 due in three months, I think it's time to > > start the process of finding and electing release managers for the next > > release of PHP.

Re: [PHP-DEV] [RFC] [DISCUSSION] Compact Object Property Assignment

2020-03-21 Thread Jakob Givoni
Hi Andrea, thanks for your feedback. Let's talk about syntax then :-) The currently suggested syntax is -> [ = , ... ] The can be an existing object: $foo->[a = 1]; Or a new, yet anonymous, object: (new Foo)->[a = 1]; 1. The (normal) brackets === The reason I

Re: [PHP-DEV] [RFC] is_literal()

2020-03-21 Thread Craig Francis
On Sat, 21 Mar 2020 at 23:22, Jakob Givoni wrote: > I'll suggest is_from_literal() as a more precise formulation. Good suggestion, I've added it to the list of Open Issues (if we can determine the different ways this can be achieved, without affecting performance, then we can see what people

Re: [PHP-DEV] [RFC] is_literal()

2020-03-21 Thread Jakob Givoni
On Sat, Mar 21, 2020 at 4:58 PM Craig Francis wrote: > I'm happy to use a different name; but I should add that is_numeric() isn't > really a type, there are other functions such as is_writable(), and the taint > extension uses is_tainted(). Right, good points. However, to my logic, whether

Re: [PHP-DEV] Are PECL modules preferable?

2020-03-21 Thread Craig Francis
On Sat, 21 Mar 2020 at 22:53, Mike Schinkel wrote: > A large number of PHP users have no control over the platform they run on, > so the option to use PECL modules is a non-starter for them. Thanks Mike, Personally I agree, I would say PECL modules are not preferable for "useful features";

Re: [PHP-DEV] Are PECL modules preferable?

2020-03-21 Thread Ben Ramsey
> On Mar 21, 2020, at 17:52, Mike Schinkel wrote: > >> On Mar 21, 2020, at 5:59 PM, tyson andre wrote: >> FROM: Re: [PHP-DEV] [RFC] is_literal() >> >> And if it can be implemented as a PECL module, that would be more preferable >> to me than a core module of php. >> If it was in core, having

Re: [PHP-DEV] [RFC] is_literal()

2020-03-21 Thread Craig Francis
Hi Tyson, Thanks for your email, I really appreciate it. I'm not a C developer, but if I was to have a go at implementing `is_literal()`, I probably would start with the existing taint extension. But you're right, that approach can cause performance issues, and doesn't play well with XDebug

[PHP-DEV] Are PECL modules preferable?

2020-03-21 Thread Mike Schinkel
> On Mar 21, 2020, at 5:59 PM, tyson andre wrote: > FROM: Re: [PHP-DEV] [RFC] is_literal() > > And if it can be implemented as a PECL module, that would be more preferable > to me than a core module of php. > If it was in core, having to support that feature may limit optimizations or >

Re: [PHP-DEV] [RFC] is_literal()

2020-03-21 Thread Craig Francis
On Sat, 21 Mar 2020 at 21:23, Jakob Givoni wrote: > On Sat, Mar 21, 2020 at 3:26 PM Craig Francis > wrote: > > > > As to the name, it's to work alongside functions such as > > is_int(), is_string(), etc - is that a good enough reason? > > I think it could cause confusion since int and string

Re: [PHP-DEV] [RFC] is_literal()

2020-03-21 Thread tyson andre
Hi Craig, https://github.com/laruence/taint#taint notes that "Please note that do not enable this extension in product(ion) env, since it will slowdown your app." - That repo already provides is_tainted() http://docs.php.net/is_tainted A fork of that repo would theoretically allow

Re: [PHP-DEV] [RFC] is_literal()

2020-03-21 Thread Jakob Givoni
On Sat, Mar 21, 2020 at 3:26 PM Craig Francis wrote: > > As to the name, it's to work alongside functions such as > is_int(), is_string(), etc - is that a good enough reason? I think it could cause confusion since int and string are value types, - literal is not a type as such, it merely

Re: [PHP-DEV] [RFC] is_literal()

2020-03-21 Thread Craig Francis
On Sat, 21 Mar 2020 at 20:06, Ben Ramsey wrote: > This seems very similar to the taint extension Hi Ben, Yes, it is similar; I hope I've covered the differences under the "Taint Checking" heading (please let me know if that could be improved).

Re: [PHP-DEV] [RFC] is_literal()

2020-03-21 Thread Craig Francis
On Sat, 21 Mar 2020 at 19:54, Dan Ackroyd wrote: > On Sat, 21 Mar 2020 at 19:14, Craig Francis > wrote: > > > > Any feedback would be appreciated. > > The RFC should probably define what a literal is. > > Good point Dan, I've added it to the intro. Please let me know if it needs more work

Re: [PHP-DEV] [RFC] is_literal()

2020-03-21 Thread Craig Francis
On Sat, 21 Mar 2020 at 19:51, Larry Garfield wrote: > Eg, there's plenty of very good reasons to put a template string into the > database rather than a file literal. Or to build an SQL query dynamically > in ways that an is_literal check would not allow, at least not without an > absurdly

Re: [PHP-DEV] [RFC] is_literal()

2020-03-21 Thread Ben Ramsey
> On Mar 21, 2020, at 14:13, Craig Francis wrote: > > Hi, > > I've written up my suggestion for a is_literal() function: > > https://wiki.php.net/rfc/is_literal > > Any feedback would be appreciated. > > Craig This seems very similar to the taint extension. How does it differ from

Re: [PHP-DEV] [RFC] is_literal()

2020-03-21 Thread Dan Ackroyd
On Sat, 21 Mar 2020 at 19:14, Craig Francis wrote: > > Any feedback would be appreciated. The RFC should probably define what a literal is. cheers Dan Ack -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [RFC] is_literal()

2020-03-21 Thread Larry Garfield
On Sat, Mar 21, 2020, at 2:13 PM, Craig Francis wrote: > Hi, > > I've written up my suggestion for a is_literal() function: > > https://wiki.php.net/rfc/is_literal > > Any feedback would be appreciated. > > Craig While I appreciate the intent, without an untaint() or equivalent I fear its

[PHP-DEV] [RFC] is_literal()

2020-03-21 Thread Craig Francis
Hi, I've written up my suggestion for a is_literal() function: https://wiki.php.net/rfc/is_literal Any feedback would be appreciated. Craig

Re: [PHP-DEV] [RFC] [DISCUSSION] Compact Object Property Assignment

2020-03-21 Thread Christoph M. Becker
On 21.03.2020 at 19:31, Andrea Faulds wrote: > However, we don't have to be so imaginitive and adapt a similar feature, > because C# already has the exact feature you are proposing, and calls it > “object initialisers”: > >     Foo foo = new Foo { >     bar = 1, >     baz = 2, >     }; >

Re: [PHP-DEV] [RFC] [DISCUSSION] Compact Object Property Assignment

2020-03-21 Thread Andrea Faulds
Hi, Jakob Givoni wrote: Hello Internals, I'm opening up my new RFC for discussion: https://wiki.php.net/rfc/compact-object-property-assignment - A pragmatic approach to object literals Let me know what you think! Best, Jakob I really don't like this `(new Foo)->[]` syntax for a few

Re: [PHP-DEV] Re: [VOTE] Server-Side Request and Response Objects (v2)

2020-03-21 Thread Ekin B.
Hi, > On March 20, 2020 5:35 PM Mark Randall wrote: > > > On 20/03/2020 13:31, Paul M. Jones wrote: > > I have opened the vote on Server-Side Request and Response Objects at > > . > To practice what I preach: > > I have voted against, as I don't

Re: [PHP-DEV] [VOTE] Voting opens for str_starts_with and ends_with functions

2020-03-21 Thread will
On 2020-03-20 14:36, Guilliam Xavier wrote: On Mon, Jul 22, 2019 at 10:54 AM Nikita Popov wrote: On Fri, Jul 5, 2019 at 4:13 AM wrote: > Hello all, > > After 15 days of discussion I have opened up voting on the following RFC > (https://wiki.php.net/rfc/add_str_begin_and_end_functions) . > >

Re: [PHP-DEV] Changing the default PDO error mode

2020-03-21 Thread AllenJB
On 19/03/2020 12:25, Christian Schneider wrote: Am 19.03.2020 um 10:31 schrieb Matteo Beccati : I agree defaulting to PDO::ERRMODE_EXCEPTION is a sensible change for PHP8. I think this should go through a deprecation phase first as it is a BC break, no matter how easy to fix you think it is.

[PHP-DEV] Re: RFC karma

2020-03-21 Thread Ilija Tovilo
Thank you Christoph! On 21.03.20, 10:05, "Christoph M. Becker" wrote: On 20.03.2020 at 19:27, Ilija Tovilo wrote: > I need RFC karma to create the RFC I mentioned in the internals list yesterday: > > https://externals.io/message/109156 > > Can somebody give

[PHP-DEV] Re: RFC karma

2020-03-21 Thread Christoph M. Becker
On 20.03.2020 at 19:27, Ilija Tovilo wrote: > I need RFC karma to create the RFC I mentioned in the internals list > yesterday: > > https://externals.io/message/109156 > > Can somebody give me those permissions? RFC karma granted. Good luck with the RFC. -- Christoph M. Becker -- PHP