Re: [PHP-DEV] json_encode indent parameter

2021-06-02 Thread David Gebler
On Wed, 2 Jun 2021, 23:03 Timon de Groot, wrote: > It's not possible to tell json_encode what indentation level should be > used when using > the JSON_PRETTY_PRINT option (2, 4, 8, etc). When generating JSON files > which can be > used/read/edited by users, indentation starts to become a relevant

Re: [PHP-DEV] Regarding array_shift()/array_unshift()

2021-06-02 Thread Larry Garfield
On Wed, Jun 2, 2021, at 6:15 PM, Mike Schinkel wrote: > > On Jun 2, 2021, at 7:07 PM, Larry Garfield wrote: > > > > On Wed, Jun 2, 2021, at 5:59 PM, Mike Schinkel wrote: > >>> On Jun 2, 2021, at 4:25 AM, Jordi Boggiano wrote: > > > >>> IMO for unshift() it'd be fine to return a new array, but w

Re: [PHP-DEV] Regarding array_shift()/array_unshift()

2021-06-02 Thread Mike Schinkel
> On Jun 2, 2021, at 7:07 PM, Larry Garfield wrote: > > On Wed, Jun 2, 2021, at 5:59 PM, Mike Schinkel wrote: >>> On Jun 2, 2021, at 4:25 AM, Jordi Boggiano wrote: > >>> IMO for unshift() it'd be fine to return a new array, but when processing a >>> list of things in a FIFO pattern I often use

Re: [PHP-DEV] Regarding array_shift()/array_unshift()

2021-06-02 Thread Larry Garfield
On Wed, Jun 2, 2021, at 5:59 PM, Mike Schinkel wrote: > > On Jun 2, 2021, at 4:25 AM, Jordi Boggiano wrote: > > IMO for unshift() it'd be fine to return a new array, but when processing a > > list of things in a FIFO pattern I often used array_shift() to get the > > first "job" out of the array

Re: [PHP-DEV] Regarding array_shift()/array_unshift()

2021-06-02 Thread Mike Schinkel
> On Jun 2, 2021, at 4:25 AM, Jordi Boggiano wrote: > > On 02/06/2021 00:34, Mike Schinkel wrote: >> But from all this I do agree with you that just returning an array would >> likely be acceptable. >> - >> >> This would not be a great solution for really large arrays, but then we >> can't

[PHP-DEV] json_encode indent parameter

2021-06-02 Thread Timon de Groot
It's not possible to tell json_encode what indentation level should be used when using the JSON_PRETTY_PRINT option (2, 4, 8, etc). When generating JSON files which can be used/read/edited by users, indentation starts to become a relevant topic. - JavaScript has a function called JSON.stringify

Re: [PHP-DEV] [RFC] Partial Function Application, take 2

2021-06-02 Thread Mike Schinkel
> On Jun 2, 2021, at 1:45 PM, Larry Garfield wrote: > > Hi folks. After much off-list discussion, iteration, and consideration, we > have a new draft of PFA ready for review. > > The URL is the same: > > https://wiki.php.net/rfc/partial_function_application Really excellent work, all! > It'

Re: [PHP-DEV] [RFC] Pure intersection types

2021-06-02 Thread G. P. B.
On Mon, 31 May 2021 at 16:09, G. P. B. wrote: > Hello, > > It has been two weeks since my last email and the only thing which has > come up are the tokenizer changes pointed out by Tyson. > To preserve BC I've aliased T_AMPERSAND with > T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG > This is also reflect

[PHP-DEV] [RFC] Partial Function Application, take 2

2021-06-02 Thread Larry Garfield
Hi folks. After much off-list discussion, iteration, and consideration, we have a new draft of PFA ready for review. The URL is the same: https://wiki.php.net/rfc/partial_function_application It's a bit long because we wanted to be as precise as possible. However, in short: * Partial applic

Re: [PHP-DEV] [RFC] Under Discussion: Add Random class and RandomNumberGenerator interface

2021-06-02 Thread Go Kudo
It was good! I was finally able to put some things together. Thank you for participating in the discussion. > typo Thanks, I fixed it! > InvalidArgumentException I think InvalidArgumentException is included in the ext/spl extension, but is it safe to use it from ext/standard? If it is available

Re: [PHP-DEV] [RFC] Under Discussion: Add Random class and RandomNumberGenerator interface

2021-06-02 Thread Jordi Boggiano
On 01/06/2021 16:28, Go Kudo wrote: Hello internals. Thanks for continuing to participate in the discussion. I've sorted out the proposal, and finished writing and implementing the RFC. (Funny, I know.) I think it's time to start a discussion. https://wiki.php.net/rfc/rng_extension https://gith

Re: [PHP-DEV] Regarding array_shift()/array_unshift()

2021-06-02 Thread Jordi Boggiano
On 02/06/2021 00:34, Mike Schinkel wrote: But from all this I do agree with you that just returning an array would likely be acceptable. - This would not be a great solution for really large arrays, but then we can't eliminate the need for a developer to have a reasonable level of knowledg

Re: [PHP-DEV] [RFC] [Vote] Final constants

2021-06-02 Thread Máté Kocsis
Hi Internals, I've just closed the vote, and the RFC is accepted with 28 votes in favor and 4 against. Regards: Máté Máté Kocsis ezt írta (időpont: 2021. máj. 24., H, 10:14): > Hi George, > > Being able to override interface constants by default might seem like a > regression, but I believe ma

Re: [PHP-DEV] "Namespaces in bundled extensions" and iterable additions to the standard library

2021-06-02 Thread Rowan Tommins
On 02/06/2021 02:30, tyson andre wrote: - Did anyone have feedback on whether iterable\ or Iterable\ makes more sense - Personally, iterable\ seems like it should be an exception due to it also being used as a soft reserved keyword that is typically lowercase. To me, a lower-case namespace l

Re: [PHP-DEV] [VOTE] Allow static properties in enums

2021-06-02 Thread Nikita Popov
On Tue, Jun 1, 2021 at 3:25 PM tyson andre wrote: > Hi internals, > > I have opened the vote on > https://wiki.php.net/rfc/enum_allow_static_properties > Voting ends on June 15, 2021 > > Previous discussion can be found at https://externals.io/message/114494 > > Thanks, > Tyson > I'm neutral on