Re: [PHP-DEV] [RFC] Treat namespaced names as single token, relax reserved keyword restrictions

2020-06-18 Thread Nikita Popov
On Thu, Jun 18, 2020 at 12:06 AM Jakob Givoni wrote: > On Tue, Jun 16, 2020 at 10:52 AM Nikita Popov > wrote: > > > > Hi internals, > > > > Inspired by the recent discussion on reserved keyword reservation, I'd > like > > to propose the followin

[PHP-DEV] Re: [VOTE] Make sorting stable

2020-06-17 Thread Nikita Popov
On Wed, Jun 3, 2020 at 3:15 PM Nikita Popov wrote: > Hi internals, > > I've opened voting on the stable sorting RFC: > https://wiki.php.net/rfc/stable_sorting > > Voting closes 2020-06-17. > This RFC has been accepted unanimously, with 45 votes in favor. Regards, Nikita

Re: [PHP-DEV] [VOTE] Ensure correct signatures of magic methods

2020-06-17 Thread Nikita Popov
On Wed, Jun 3, 2020 at 11:11 PM Gabriel Caruso wrote: > On Wed, 3 Jun 2020 at 12:32, Nikita Popov wrote: > >> On Sun, May 31, 2020 at 11:20 PM Gabriel Caruso < >> carusogabrie...@gmail.com> wrote: >> >>> On Sun, 31 May 2020 at 15:57, Nikita Popov wrote: &

Re: [PHP-DEV] [RFC] [DISCUSSION] Allow void return type for constructors/destructors

2020-06-17 Thread Nikita Popov
On Wed, Jun 17, 2020 at 9:18 AM Christian Schneider wrote: > Am 16.06.2020 um 21:30 schrieb Benas IML : > > I put the original RFC on hold and created a new PR [0] for implicitly > > enforcing `void` rules on both constructors and destructors. Note, that > > this results in a BC break since it

Re: [PHP-DEV] [RFC] Treat namespaced names as single token, relax reserved keyword restrictions

2020-06-16 Thread Nikita Popov
On Tue, Jun 16, 2020 at 10:28 PM Davey Shafik wrote: > > > On Tue, Jun 16, 2020 at 1:52 AM Nikita Popov wrote: > >> Hi internals, >> >> Inspired by the recent discussion on reserved keyword reservation, I'd >> like >> to propose the fol

Re: [PHP-DEV] SQLite3, PDO/SQLite and driver specific methods

2020-06-16 Thread Nikita Popov
On Tue, Jun 16, 2020 at 12:42 PM Dan Ackroyd wrote: > On Tue, 16 Jun 2020 at 11:32, Peter Bowyer > wrote: > > > > If it is, how can we change and improve the current situation? > > > > Hi Peter, > > I think what I wrote earlier is still a good approach: >

Re: [PHP-DEV] [VOTE] Remove inappropriate inheritance signature checks on private methods

2020-06-16 Thread Nikita Popov
On Mon, Jun 15, 2020 at 10:43 PM Pedro Magalhães wrote: > Hi internals, > > I have opened the vote on the "Remove inappropriate inheritance signature > checks on private methods" RFC. Which can be found here: > > https://wiki.php.net/rfc/inheritance_private_methods > > The voting period will end

[PHP-DEV] [RFC] Treat namespaced names as single token, relax reserved keyword restrictions

2020-06-16 Thread Nikita Popov
Hi internals, Inspired by the recent discussion on reserved keyword reservation, I'd like to propose the following RFC: https://wiki.php.net/rfc/namespaced_names_as_token This RFC makes two related changes: Treat namespaced names as a single token, which enables use of reserved keywords inside

Re: [PHP-DEV] Remove LSP checks on static methods?

2020-06-16 Thread Nikita Popov
On Tue, Jun 16, 2020 at 8:59 AM Mike Schinkel wrote: > Hi internals, > > Given that there appears to be some appetite to reduce checks for > inappropriate signatures[1] I am wondering if anyone has strong opinions — > pro or con — on removing checks for static methods? > > My primary use-case

Re: [PHP-DEV] About the use of the terms master/slave and blacklist, proposal to replace.

2020-06-15 Thread Nikita Popov
On Mon, Jun 15, 2020 at 5:43 PM Daniel Rodrigues Lima < danielrodrigues...@hotmail.com> wrote: > Hi internals, > > I think the time has come for the PHP internals to discuss the use of > master/slave and blacklist terminologies. > As everyone can see, we are going through times of change in the

Re: [PHP-DEV] [VOTE] Attribute Amendments

2020-06-15 Thread Nikita Popov
On Mon, Jun 8, 2020 at 10:13 AM Benjamin Eberlei wrote: > Hello internals, > > I have opened voting for four different amendments to the Attributes RFC > > https://wiki.php.net/rfc/attribute_amendments > > The voting period ends at 2020-06-22 8:00 UTC. > > greetings > Benjamin > On the

Re: [PHP-DEV] [Declined] Opcache optimization without any caching

2020-06-13 Thread Nikita Popov
On Sat, Jun 13, 2020 at 5:08 PM tyson andre wrote: > Hi internals, > > https://wiki.php.net/rfc/opcache.no_cache has been declined, with 10 yes > votes and 13 no votes. > > The "If you voted no, why?" section indicates that there was broad support > for moving opcache optimizations outside of

Re: [PHP-DEV] Revisiting proposal for addition of `get_class_constants()`

2020-06-12 Thread Nikita Popov
On Fri, Jun 12, 2020 at 6:32 AM Troy McCabe wrote: > Hey Nikita, > > Thanks for the thoughts. > > > Could you please explain in more detail *why* we should duplicate > existing reflection functionality into free-standing functions? > > In terms of the *why*, there were three main reasons: > 1.

Re: [PHP-DEV] Revisiting proposal for addition of `get_class_constants()`

2020-06-11 Thread Nikita Popov
On Wed, Jun 10, 2020 at 6:33 AM Troy McCabe wrote: > Hi All, > > With several functions (`str_contains()`, `str_[starts|ends]_with()`) added > for PHP8 to make things more clear, it feels like a good time to revisit > the multiple requests to add `get_class_constants(string $class): array`. >

[PHP-DEV] Re: Making all Traversables an Iterator or IteratorAggregate

2020-06-09 Thread Nikita Popov
On Tue, May 12, 2020 at 10:26 AM Nikita Popov wrote: > On Wed, Mar 11, 2020 at 10:50 AM Nikita Popov > wrote: > >> Hi internals, >> >> Userland classes that implement Traversable must do so either through >> Iterator or IteratorAggregate. The same requireme

Re: [PHP-DEV] Re: Making all Traversables an Iterator or IteratorAggregate

2020-06-09 Thread Nikita Popov
On Tue, May 12, 2020 at 2:49 PM Sara Golemon wrote: > On Tue, May 12, 2020 at 3:26 AM Nikita Popov wrote: > > // WeakMap::getIterator(): Iterator > > ZEND_METHOD(WeakMap, getIterator) > > { > > if (zend_parse_parameters_none() == FA

Re: [PHP-DEV] RFC karma

2020-06-09 Thread Nikita Popov
On Tue, Jun 9, 2020 at 9:17 AM Enrico Zimuel wrote: > Hi Internals, > > I'd like to propose an RFC for overriding internal and userland functions. > > The idea came while working on an Application Performance Monitoring (APM) > agent for PHP, where I needed to intercept execution code to provide

Re: [PHP-DEV] [RFC] Named arguments

2020-06-08 Thread Nikita Popov
On Fri, Jun 5, 2020 at 3:40 PM Nikita Popov wrote: > On Fri, Jun 5, 2020 at 12:45 PM Christian Schneider > wrote: > >> Am 05.05.2020 um 15:51 schrieb Nikita Popov : >> > \I've now updated the old proposal on this topic, and moved it back >> under >> &g

Re: [PHP-DEV] Refactoring run-tests.php

2020-06-05 Thread Nikita Popov
On Fri, Jun 5, 2020 at 5:42 PM Max Semenik wrote: > I was thinking about making some improvements to our venerable test runner, > however I wasn't feeling confident about improving the present code base. > Instead, I decided to attempt to refactor it. > > Here's my work in progress:

Re: [PHP-DEV] [RFC] Named arguments

2020-06-05 Thread Nikita Popov
On Fri, Jun 5, 2020 at 12:45 PM Christian Schneider wrote: > Am 05.05.2020 um 15:51 schrieb Nikita Popov : > > \I've now updated the old proposal on this topic, and moved it back under > > discussion: https://wiki.php.net/rfc/named_params > > First of all I really like t

Re: [PHP-DEV] [RFC] Deprecations for PHP 8.0

2020-06-05 Thread Nikita Popov
On Fri, Jun 5, 2020 at 11:14 AM Nicolas Grekas wrote: > > It's that time of year again. Feature freeze is looming, so it's time to >> talk about deprecations! >> >> https://wiki.php.net/rfc/deprecations_php_8_0 >> > > Thanks for the RFC. > Would it make sense for you to postpone this for 8.1? >

[PHP-DEV] [RFC] Deprecations for PHP 8.0

2020-06-05 Thread Nikita Popov
Hi internals, It's that time of year again. Feature freeze is looming, so it's time to talk about deprecations! https://wiki.php.net/rfc/deprecations_php_8_0 The procedure is as usual. There are multiple deprecations part of the RFC, but they will be voted separately. If you would like to add

[PHP-DEV] [VOTE] Make sorting stable

2020-06-03 Thread Nikita Popov
Hi internals, I've opened voting on the stable sorting RFC: https://wiki.php.net/rfc/stable_sorting Voting closes 2020-06-17. Regards, Nikita

Re: [PHP-DEV] [VOTE] Ensure correct signatures of magic methods

2020-06-03 Thread Nikita Popov
On Sun, May 31, 2020 at 11:20 PM Gabriel Caruso wrote: > On Sun, 31 May 2020 at 15:57, Nikita Popov wrote: > >> On Fri, May 29, 2020 at 6:45 PM Gabriel Caruso >> wrote: >> >>> Hello, internals! >>> >>> I have opened the voting for &

Re: [PHP-DEV] Numeric Type

2020-06-03 Thread Nikita Popov
On Tue, Jun 2, 2020 at 5:10 PM Deleu wrote: > Hello Internals, > > I'd like to know what would be people's feelings towards having a `numeric` > type. I remember reading the nullable casting RFC ( > https://wiki.php.net/rfc/nullable-casting) and it's discussion ( >

Re: [PHP-DEV] RFC proposal: fsync support for file resources

2020-06-03 Thread Nikita Popov
On Mon, Jun 1, 2020 at 6:57 PM David Gebler wrote: > Exactly as the subject says, I would like to propose an RFC for adding an > fsync() function for file resources, which would in essence be a thin > wrapper around C's fsync on UNIX systems and _commit on Windows. > > It seems to me an odd

Re: [PHP-DEV] RFC proposal: Spread Operator for Array Destructuring Assignment

2020-06-03 Thread Nikita Popov
On Wed, Jun 3, 2020 at 12:02 PM Côme Chilliet < come.chill...@fusiondirectory.org> wrote: > Le Wed, 3 Jun 2020 11:46:00 +0200, > Nikita Popov a écrit : > > To give a tl;dr of existing discussions on the topic: > > > > $foobar = [2 => 2, 1 => 1, 0 =>

Re: [PHP-DEV] [RFC] Nullsafe operator

2020-06-03 Thread Nikita Popov
On Tue, Jun 2, 2020 at 10:53 PM Ilija Tovilo wrote: > Hi internals > > I'd like to introduce another RFC I've been working on: > https://wiki.php.net/rfc/nullsafe_operator > > It introduces the nullsafe operator ?-> that skips null values when > calling functions and fetching properties. In

Re: [PHP-DEV] RFC proposal: Spread Operator for Array Destructuring Assignment

2020-06-03 Thread Nikita Popov
On Wed, Jun 3, 2020 at 11:37 AM paul laffitte wrote: > Hello, > > I would like to submit an RFC proposal about array destructuring > assignment. An RFC has already been implemented in php 7.1 about this ( > https://wiki.php.net/rfc/short_list_syntax), but I feel like something is > missing for

Re: [PHP-DEV] RFC: Error backtraces

2020-06-03 Thread Nikita Popov
On Tue, Jun 2, 2020 at 10:57 PM Max Semenik wrote: > On Sun, May 31, 2020 at 4:47 PM Nikita Popov wrote: > > > I'm concerned about the performance implications of this change. > Backtrace > > gathering is quite expensive and doing this for every diagnostic will > have

Re: [PHP-DEV] [VOTE] Ensure correct signatures of magic methods

2020-05-31 Thread Nikita Popov
On Fri, May 29, 2020 at 6:45 PM Gabriel Caruso wrote: > Hello, internals! > > I have opened the voting for > https://wiki.php.net/rfc/magic-methods-signature. > > The voting period ends on 2020-06-19 at 18h (CEST). > The RFC is a bit unclear on what is actually being proposed. It says > This

Re: [PHP-DEV] RFC: Error backtraces

2020-05-31 Thread Nikita Popov
On Fri, May 29, 2020 at 8:24 PM Max Semenik wrote: > Hi, I'd like to present a new RFC for your consideration: > https://wiki.php.net/rfc/error_backtraces > > In a nutshell, I'm proposing to give errors equal rights with exceptions > and provide backtraces for them, too. > I'm concerned about

[PHP-DEV] Re: [RFC] Named arguments

2020-05-29 Thread Nikita Popov
On Tue, May 5, 2020 at 3:51 PM Nikita Popov wrote: > Hi internals, > > I've recently started a thread on resurrecting the named arguments > proposal (https://externals.io/message/109549), as this has come up > tangentially in some recent discussions around attributes an

[PHP-DEV] Re: [RFC] Make sorting stable

2020-05-29 Thread Nikita Popov
On Tue, May 12, 2020 at 4:18 PM Nikita Popov wrote: > Hi internals, > > This was previously discussed in https://externals.io/message/108841, but > I figured it would make sense to create an RFC for this change: > https://wiki.php.net/rfc/stable_sorting > > As before, the im

[PHP-DEV] Re: [VOTE] Constructor Property Promotion

2020-05-29 Thread Nikita Popov
On Fri, May 15, 2020 at 10:17 AM Nikita Popov wrote: > Hi internals, > > I have opened voting on https://wiki.php.net/rfc/constructor_promotion. > Voting will close 2020-05-29. > The constructor property promotion has been accepted with 46 votes in favor and 10 against. Regards, Nikita

Re: [PHP-DEV] [RFC] Amendments to Attributes

2020-05-22 Thread Nikita Popov
On Fri, May 22, 2020 at 5:29 PM Benjamin Eberlei wrote: > > > On Fri, May 22, 2020 at 1:08 PM Nikita Popov wrote: > >> On Wed, May 20, 2020 at 7:08 PM Benjamin Eberlei >> wrote: >> >>> Hi everyone, >>> >>> the Attributes RFC was

Re: [PHP-DEV] [RFC] Amendments to Attributes

2020-05-22 Thread Nikita Popov
On Fri, May 22, 2020 at 2:19 PM Benas IML wrote: > Agreed. > > I don't think we should pollute any other than the `PHP\` namespace. If > that RFC doesn't pass though, we should keep the `Attribute` class in the > global namespace. > > Global namespace is already reserved for PHP and so, BC

Re: [PHP-DEV] [RFC] Amendments to Attributes

2020-05-22 Thread Nikita Popov
On Wed, May 20, 2020 at 7:08 PM Benjamin Eberlei wrote: > Hi everyone, > > the Attributes RFC was rather large already, so a few things were left open > or discussions during the vote have made us rethink a things. > > https://wiki.php.net/rfc/attribute_amendments > > These points are handled by

Re: [PHP-DEV] HTTP/1.1 by default in PHP 8.0

2020-05-22 Thread Nikita Popov
On Thu, May 21, 2020 at 11:54 PM Rowan Tommins wrote: > Hi all, > > A few years ago, I posted a message suggesting that PHP improve support > for HTTP/1.1 in its stream wrapper functions: > https://externals.io/message/96192 > > A quick summary of the current situation: > > * HTTP/1.1 was

Re: [PHP-DEV] [PHP-8.0] First alpha coming in 4 weeks

2020-05-21 Thread Nikita Popov
On Thu, May 21, 2020 at 6:02 PM Gabriel Caruso wrote: > Hello internals, > > > This is a message from your Release Managers reminding you that PHP 8's > first alpha is happening in 4 weeks. > > You can follow PHP's 8 schedule on https://wiki.php.net/todo/php80. > > > I'd like to remind you as

[PHP-DEV] [VOTE] Constructor Property Promotion

2020-05-15 Thread Nikita Popov
Hi internals, I have opened voting on https://wiki.php.net/rfc/constructor_promotion. Voting will close 2020-05-29. Regards, Nikita

Re: [PHP-DEV] [RFC] Make sorting stable

2020-05-12 Thread Nikita Popov
On Tue, May 12, 2020 at 4:29 PM Nicolas Grekas wrote: > Hi Nikita, > > Thanks for another nice RFC. > > This was previously discussed in https://externals.io/message/108841, but >> I >> figured it would make sense to create an RFC for this change: >> https://wiki.php.net/rfc/stable_sorting >> >>

[PHP-DEV] [RFC] Make sorting stable

2020-05-12 Thread Nikita Popov
Hi internals, This was previously discussed in https://externals.io/message/108841, but I figured it would make sense to create an RFC for this change: https://wiki.php.net/rfc/stable_sorting As before, the implementation approach is to stick with the existing qsort and use a fallback comparison

[PHP-DEV] Re: Making all Traversables an Iterator or IteratorAggregate

2020-05-12 Thread Nikita Popov
On Wed, Mar 11, 2020 at 10:50 AM Nikita Popov wrote: > Hi internals, > > Userland classes that implement Traversable must do so either through > Iterator or IteratorAggregate. The same requirement does not exist for > internal classes: They can implement the internal get_ite

Re: [PHP-DEV] Re: [RFC] Constructor Property Promotion

2020-05-11 Thread Nikita Popov
On Mon, May 11, 2020 at 5:26 PM Dan Ackroyd wrote: > On Mon, 11 May 2020 at 10:52, Nikita Popov wrote: > > > > Please tell me if you have further concerns > > Question - as this is just sugar, presumably it doesn't add much > complexity to the PHP engine? > Yes, th

Re: [PHP-DEV] printf() improvements

2020-05-11 Thread Nikita Popov
On Thu, Apr 23, 2020 at 8:30 AM G. P. B. wrote: > On Wed, 22 Apr 2020 at 15:25, Nikita Popov wrote: > >> Hi internals, >> >> I'd like to make two improvements to the printf() functionality exposed by >> PHP (also affecting other variations like sprintf, vprint

[PHP-DEV] Re: Add get_resource_id() function

2020-05-11 Thread Nikita Popov
On Tue, Apr 21, 2020 at 12:44 PM Nikita Popov wrote: > Hi internals, > > This originally came up in the "Stricter type-checks for > arithmetic/bitwise operators" thread. I would like to add a > get_resource_id() function, which does the same as an (int) $resource cast,

[PHP-DEV] Re: [RFC] Constructor Property Promotion

2020-05-11 Thread Nikita Popov
On Thu, Mar 26, 2020 at 2:30 PM Nikita Popov wrote: > Hi internals, > > I would like to submit the following RFC for your consideration: > https://wiki.php.net/rfc/constructor_promotion > > This is based on one off the suggestions made in > https://externals.io/message/1092

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

2020-05-11 Thread Nikita Popov
On Fri, May 8, 2020 at 8:49 AM Manuel Canga wrote: > > > > > En lun, 04 may 2020 19:33:51 +0200 Rowan Tommins < > rowan.coll...@gmail.com> escribió > > On 04/05/2020 16:43, Manuel Canga wrote: > > > I think I’d be positive of adding `inout` keyword in order to: > > > > > > - Check

Re: [PHP-DEV] Re: [RFC] Unbundle ext/xmlrpc

2020-05-11 Thread Nikita Popov
On Mon, May 11, 2020 at 11:00 AM Björn Larsson wrote: > Den 2020-05-11 kl. 08:57, skrev Christoph M. Becker: > > > On 26.04.2020 at 15:28, Christoph M. Becker wrote: > > > >> I propose to unbundle ext/xmlrpc, and written a respective RFC: > >> > >> > >

Re: [PHP-DEV] Proposal For Return-If / Early Return / Guard Clause Syntax

2020-05-10 Thread Nikita Popov
On Sun, May 10, 2020 at 5:49 PM Ralph Schindler wrote: > Hi! > > > # Intro > > I am proposing what is a near completely syntactical addition (only > change is to language.y) to the language. The best terminology for this > syntax is are: `return if`, "return early", or "guard clauses". > >

Re: [PHP-DEV] Deprecating uniqid()

2020-05-06 Thread Nikita Popov
On Wed, May 6, 2020 at 2:34 PM Rowan Tommins wrote: > On 5 May 2020 09:42:19 BST, Arvids Godjuks > wrote: > >So in my opinion, a better replacement for uniqid is needed - have it > >generate a bigger string with more entropy and better underline algorithm, > >but it being time-based should be a

Re: [PHP-DEV] [RFC] Named arguments

2020-05-06 Thread Nikita Popov
On Tue, May 5, 2020 at 8:38 PM Lynn wrote: > > > On Tue, May 5, 2020 at 8:22 PM Nikita Popov wrote: > >> Anyway. Your point that named arguments expand the API surface has been >> acknowledged. I don't think this issue is really avoidable, it's a rather >>

Re: [PHP-DEV] Re: [RFC] Constructor Property Promotion

2020-05-06 Thread Nikita Popov
On Tue, May 5, 2020 at 10:27 PM Larry Garfield wrote: > On Tue, May 5, 2020, at 7:35 AM, Nikita Popov wrote: > > > > Performing validation when the getAttributes() call is performed does > sound > > reasonable to me. We can also add a class flag to perform this

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

2020-05-06 Thread Nikita Popov
On Wed, May 6, 2020 at 9:32 AM Christoph M. Becker wrote: > Hi all, > > since master requires (mostly) C99 compliant compilers anyway, I wonder > if we like to update our coding standards[1], to reflect: > > * that we require (mostly) C99 compliant compilers (instead of ANSI-C > compliant

Re: [PHP-DEV] [RFC] Named arguments

2020-05-05 Thread Nikita Popov
On Tue, May 5, 2020 at 7:19 PM Marco Pivetta wrote: > Hey Theodore, > > > > On Tue, May 5, 2020 at 6:59 PM Theodore Brown > wrote: > >> On Tue, May 5, 2020 at 9:11 AM Marco Pivetta wrote: >> >> > As mentioned some days ago, I see named parameters as an added >> liability, >> > rather than

[PHP-DEV] [RFC] Named arguments

2020-05-05 Thread Nikita Popov
Hi internals, I've recently started a thread on resurrecting the named arguments proposal (https://externals.io/message/109549), as this has come up tangentially in some recent discussions around attributes and around object ergonomics. I've now updated the old proposal on this topic, and moved

Re: [PHP-DEV] Re: [RFC] Constructor Property Promotion

2020-05-05 Thread Nikita Popov
On Wed, Apr 29, 2020 at 11:27 AM Benjamin Eberlei wrote: > > > On Wed, Apr 29, 2020 at 11:07 AM Nikita Popov > wrote: > >> On Wed, Apr 29, 2020 at 10:56 AM Benjamin Eberlei >> wrote: >> >>> >>> >>> On Wed, Apr 29, 2020 at 9:47

Re: [PHP-DEV] Deprecating uniqid()

2020-05-02 Thread Nikita Popov
On Sat, May 2, 2020 at 9:13 PM Ben Ramsey wrote: > > On May 2, 2020, at 13:57, AllenJB wrote: > > > > Hi all, > > > > I'd like to discuss deprecating uniqid() > > > > I believe it's dangerously bad a doing "what it says on the tin". New > developers still reach for it and do not read the

Re: [PHP-DEV] Renaming PhpAttribute to Attribute

2020-05-02 Thread Nikita Popov
On Sat, May 2, 2020 at 5:57 PM Niklas Keller wrote: > Hey Benas, > > a question has come up whether we even need the PhpAttribute / > Attribute attribute at all. We could prevent any conflict if we just > delete it. > > Best, > Niklas > We need Attribute so static analysis tooling and IDEs can

Re: [PHP-DEV] Ternary operator associativity

2020-04-30 Thread Nikita Popov
On Thu, Apr 30, 2020 at 1:12 PM Ryan Jentzsch wrote: > Is there a possibility this can be fixed in version 8? From > http://phpsadness.com/sad/30 listed as an outright bug (I don't have > the C skills to fix this. I am just raising this as an issue that has > been a criticism of PHP for many

[PHP-DEV] Re: [VOTE] Stricter type-checks for arithmetic/bitwise operators

2020-04-30 Thread Nikita Popov
On Thu, Apr 16, 2020 at 12:46 PM Nikita Popov wrote: > Hi internals, > > I have opened voting on > https://wiki.php.net/rfc/arithmetic_operator_type_checks. Voting closes > 2020-04-30. > The RFC has been accepted unanimously with 57 votes in favor. Nikita

Re: [PHP-DEV] Renaming PhpAttribute to Attribute

2020-04-29 Thread Nikita Popov
On Wed, Apr 29, 2020 at 3:24 PM Côme Chilliet < come.chill...@fusiondirectory.org> wrote: > Le mercredi 29 avril 2020, 14:58:02 CEST Nikita Popov a écrit : > > On Wed, Apr 29, 2020 at 2:51 PM Côme Chilliet < > > come.chill...@fusiondirectory.org> wrote: > > > L

Re: [PHP-DEV] Moving json extension to core?

2020-04-29 Thread Nikita Popov
On Wed, Apr 22, 2020 at 7:38 PM tyson andre wrote: > Hi internals, > > Currently, it's possible to disable the json extension with `./configure > --disable-json`. > However, JSON is widely used in many use cases - web sites, logging > output, and as a data format that can be used in CLI programs

Re: [PHP-DEV] Renaming PhpAttribute to Attribute

2020-04-29 Thread Nikita Popov
On Wed, Apr 29, 2020 at 2:51 PM Côme Chilliet < come.chill...@fusiondirectory.org> wrote: > Le mardi 28 avril 2020, 18:59:22 CEST Benas IML a écrit : > > Could you provide any examples as to where '\Attribute' is being used in > the > > wild? I haven't seen a single project that has an Attribute

Re: [PHP-DEV] Re: [RFC] Constructor Property Promotion

2020-04-29 Thread Nikita Popov
On Wed, Apr 29, 2020 at 10:56 AM Benjamin Eberlei wrote: > > > On Wed, Apr 29, 2020 at 9:47 AM Nicolas Grekas < > nicolas.grekas+...@gmail.com> wrote: > >> > I think it might be best to apply to "both" and provide an isPromoted() >> > method on both ReflectionParameter and ReflectionProperty.

Re: [PHP-DEV] [RFC] Function pipe operator

2020-04-29 Thread Nikita Popov
On Wed, Apr 29, 2020 at 2:35 AM Larry Garfield wrote: > On Tue, Apr 21, 2020, at 9:43 AM, Larry Garfield wrote: > > > On Mon, Apr 20, 2020, at 11:06 PM, Sara Golemon wrote: > > > Happy with the revival, and I do want to underline the "Future Work" > > > section about Partial Functions. PF will

Re: [PHP-DEV] Re: [RFC] Constructor Property Promotion

2020-04-29 Thread Nikita Popov
On Wed, Apr 29, 2020 at 2:05 AM Larry Garfield wrote: > On Tue, Apr 28, 2020, at 10:56 AM, Nicolas Grekas wrote: > > > > > > > I would expect attributes to apply only to the properties on my side. > > > > > > Parameter annotations could be interesting for dependency injection. > > > Symfony

Re: [PHP-DEV] Renaming PhpAttribute to Attribute

2020-04-28 Thread Nikita Popov
On Tue, Apr 28, 2020 at 6:21 PM Aaron Piotrowski wrote: > > > On Apr 28, 2020, at 10:37 AM, Benas IML > wrote: > > > > Hey internals, > > > > Since it's safe to say that the Attributes v2 RFC has passed, I wanted to > > make a separate thread based on the comment by Rowan Tommins in the PHP > >

[PHP-DEV] Re: [RFC] Constructor Property Promotion

2020-04-28 Thread Nikita Popov
On Thu, Mar 26, 2020 at 2:30 PM Nikita Popov wrote: > Hi internals, > > I would like to submit the following RFC for your consideration: > https://wiki.php.net/rfc/constructor_promotion > > This is based on one off the suggestions made in > https://externals.io/message/1092

[PHP-DEV] Re: [VOTE] Allow trailing comma in parameter lists

2020-04-28 Thread Nikita Popov
On Tue, Apr 14, 2020 at 12:26 PM Nikita Popov wrote: > Hi internals, > > I've opened voting on > https://wiki.php.net/rfc/trailing_comma_in_parameter_list. Voting will > close on 2020-04-28. > This proposal has been accepted with 58 votes in favor and 1 vote against. Regards, Nikita

Re: [PHP-DEV] [VOTE] match expression

2020-04-28 Thread Nikita Popov
On Mon, Apr 27, 2020 at 3:57 PM Andrea Faulds wrote: > Hi, > > I share Dan's reasons for voting against. I don't think things should go > to a vote before the dust has settled. > > Regards, > Andrea Faulds > Similar sentiment here. I don't think the concept has been explored sufficiently. Many

Re: [PHP-DEV] Optimizing assembly for spl_object_id(), fdiv(), etc in the JIT?

2020-04-25 Thread Nikita Popov
On Sat, Apr 25, 2020 at 6:44 PM tyson andre wrote: > Hi internals, > > I was wondering if the maintainers of the Opcache Jit would be open to > work on optimizing functions such as intdiv(), fdiv(), and spl_object_id() > in the JIT to assembly code when it was safe to do so. > These functions

Re: [PHP-DEV] Re: [RFC] [DISCUSSION] Locale-independent float to string cast

2020-04-22 Thread Nikita Popov
On Wed, Apr 22, 2020 at 10:53 AM Guilliam Xavier wrote: > On Tue, Apr 21, 2020 at 10:01 PM Máté Kocsis > wrote: > > > > That said, we'd like to open the vote on Thursday, unless serious > concerns > > arise > > in the meanwhile. > > > > Cheers, > > Máté > > Hi, thanks for the work, > >

[PHP-DEV] printf() improvements

2020-04-22 Thread Nikita Popov
Hi internals, I'd like to make two improvements to the printf() functionality exposed by PHP (also affecting other variations like sprintf, vprintf, etc.) These improvements are motivated by https://wiki.php.net/rfc/locale_independent_float_to_string, which will make float to string casts locale

[PHP-DEV] Add get_resource_id() function

2020-04-21 Thread Nikita Popov
Hi internals, This originally came up in the "Stricter type-checks for arithmetic/bitwise operators" thread. I would like to add a get_resource_id() function, which does the same as an (int) $resource cast, just in a more explicit way, that does not require the reader to be familiar with PHP

Re: [PHP-DEV] [RFC] Function pipe operator

2020-04-21 Thread Nikita Popov
On Tue, Apr 21, 2020 at 3:39 AM Larry Garfield wrote: > Hello fine people of Internals! > > I've been commenting on other RFCs enough lately that I should probably > put myself through the wringer, too. I therefore offer this RFC to add a > function pipe operator, as seen in a number of other

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

2020-04-20 Thread Nikita Popov
On Mon, Apr 20, 2020 at 5:59 AM wrote: > Hello, > > I have opened voting for the str_starts_with and str_ends with RFC. The > voting will be open until two weeks from now, 2020-05-04. > > RFC: > https://wiki.php.net/rfc/add_str_starts_with_and_ends_with_functions > > Please vote, thanks! >

Re: [PHP-DEV] Resurrecting named parameters

2020-04-17 Thread Nikita Popov
On Thu, Apr 9, 2020 at 7:21 AM Stanislav Malyshev wrote: > Hi! > > > 2. Throw a notice if a parameter name is changed. While LSP violations > are > > normally fatal errors (in PHP 8), we could use a lower-severity > diagnostic > > for this case, that allows code to still run, but makes

Re: [PHP-DEV] Type hints in array destructuring expressions

2020-04-16 Thread Nikita Popov
On Thu, Apr 16, 2020 at 12:20 PM Enno Woortmann wrote: > Hi together, > > as the voting for the "Type casting in array destructuring expressions" > shows a clear direction to be declined (sad faces on my side, I really > would've liked it as a feature completion of the casting feature set >

[PHP-DEV] [VOTE] Stricter type-checks for arithmetic/bitwise operators

2020-04-16 Thread Nikita Popov
Hi internals, I have opened voting on https://wiki.php.net/rfc/arithmetic_operator_type_checks. Voting closes 2020-04-30. Regards, Nikita

Re: [PHP-DEV] [DISCUSSION] Match expression

2020-04-15 Thread Nikita Popov
On Sun, Apr 12, 2020 at 2:16 AM Ilija Tovilo wrote: > Hi internals > > I'd like to announce the match expression RFC that replaces the switch > expression RFC I announced a few weeks ago. > New: https://wiki.php.net/rfc/match_expression > Old: https://wiki.php.net/rfc/switch_expression > > Due

Re: [PHP-DEV] [RFC] [DISCUSSION] Ensure correct magic methods' signatures when typed

2020-04-15 Thread Nikita Popov
On Tue, Apr 14, 2020 at 7:45 PM Claude Pache wrote: > > > Le 14 avr. 2020 à 18:53, Nikita Popov a écrit : > > On Tue, Apr 14, 2020 at 6:07 PM Claude Pache > wrote: > >> >> >> > Le 14 avr. 2020 à 16:54, Nicolas Grekas >> a écrit : >> >

Re: [PHP-DEV] Re: [RFC] Constructor Property Promotion

2020-04-14 Thread Nikita Popov
nce in practice though. > In my opinion, the existing PHP syntax is already clear and good enough. > Fair enough :) Nikita ------ > *From:* Nikita Popov > *Sent:* Tuesday, April 14, 2020 16:02 > *To:* PHP internals > *Subject:* [PHP-DEV] Re: [RFC] Cons

Re: [PHP-DEV] [RFC] [DISCUSSION] Ensure correct magic methods' signatures when typed

2020-04-14 Thread Nikita Popov
On Tue, Apr 14, 2020 at 6:07 PM Claude Pache wrote: > > > > Le 14 avr. 2020 à 16:54, Nicolas Grekas > a écrit : > > > > I'm just not sold on allowing "void" on __construct, because the very > concept of a return type on a constructor is ... void, and also because of > the code style choices

[PHP-DEV] Re: [RFC] Constructor Property Promotion

2020-04-14 Thread Nikita Popov
On Thu, Mar 26, 2020 at 2:30 PM Nikita Popov wrote: > Hi internals, > > I would like to submit the following RFC for your consideration: > https://wiki.php.net/rfc/constructor_promotion > > This is based on one off the suggestions made in > https://externals.io/message/1092

Re: [PHP-DEV] [RFC] Stricter type-checks for arithmetic/bitwise operators

2020-04-14 Thread Nikita Popov
On Thu, Apr 2, 2020 at 3:11 PM Rowan Tommins wrote: > Hi Nikita, > > On Thu, 2 Apr 2020 at 09:14, Nikita Popov wrote: > > > I would like to propose making the use of arithmetic/bitwise operators on > > arrays, resources and (non-overloaded) objects a TypeError

[PHP-DEV] [VOTE] Allow trailing comma in parameter lists

2020-04-14 Thread Nikita Popov
Hi internals, I've opened voting on https://wiki.php.net/rfc/trailing_comma_in_parameter_list. Voting will close on 2020-04-28. Regards, Nikita

[PHP-DEV] Re: Resurrecting named parameters

2020-04-09 Thread Nikita Popov
On Tue, Apr 7, 2020 at 2:44 PM Nikita Popov wrote: > Hi internals, > > It's been a few years since I originally brought up the named parameters > RFC: https://wiki.php.net/rfc/named_params > > This topic has recently come up as part of > https://externals.io/message/109220

[PHP-DEV] Re: [RFC] Allow trailing comma in parameter lists

2020-04-09 Thread Nikita Popov
On Thu, Mar 26, 2020 at 7:52 PM Nikita Popov wrote: > Hi internals, > > This has been declined in the past, but I just keep making this mistake, > and believe it deserves reconsideration... > > https://wiki.php.net/rfc/trailing_comma_in_parameter_list > Heads up: I plan t

Re: [PHP-DEV] [RFC] Constructor Property Promotion

2020-04-08 Thread Nikita Popov
On Wed, Apr 8, 2020 at 1:56 PM Nicolas Grekas wrote: > > I would like to submit the following RFC for your consideration: >> https://wiki.php.net/rfc/constructor_promotion >> > > I love it :) > > Just one question: > Shouldn't default values be copied on the signature? That would be > expected

[PHP-DEV] Resurrecting named parameters

2020-04-07 Thread Nikita Popov
Hi internals, It's been a few years since I originally brought up the named parameters RFC: https://wiki.php.net/rfc/named_params This topic has recently come up as part of https://externals.io/message/109220 again, in particular with the observation that the combination of constructor parameter

Re: [PHP-DEV] [VOTE] throw expression

2020-04-05 Thread Nikita Popov
On Sun, Apr 5, 2020 at 2:05 PM Ilija Tovilo wrote: > Sorry Dan, at the time I sent this e-mail I wasn't aware you wouldn't > receive it. After not hearing from you I assumed you were ok with my > response. > > > The issue is that as your words are written, it is not possible for me > > to

Re: [PHP-DEV] [RFC] Stricter type-checks for arithmetic/bitwise operators

2020-04-03 Thread Nikita Popov
On Thu, Apr 2, 2020 at 3:11 PM Rowan Tommins wrote: > Hi Nikita, > > On Thu, 2 Apr 2020 at 09:14, Nikita Popov wrote: > > > I would like to propose making the use of arithmetic/bitwise operators on > > arrays, resources and (non-overloaded) objects a TypeError

Re: [PHP-DEV] [RFC] Constructor Property Promotion

2020-04-02 Thread Nikita Popov
On Thu, Apr 2, 2020 at 3:47 PM Markus Fischer wrote: > Him > > On 02.04.20 12:07, Nikita Popov wrote: > > Reflection will see the state after desugaring. That is, it just sees > > normal properties and normal constructor args. I've made this more > explicit >

Re: [PHP-DEV] [VOTE] Userspace operator overloading

2020-04-02 Thread Nikita Popov
On Sat, Mar 28, 2020 at 10:19 PM Andrea Faulds wrote: > Hi everyone, > > Johannes Schlüter wrote: > > > > If we use two methods as well it is a saner design. I won't like it, but > lot better than the current one. > > Just want to +1 this. Two methods, neither of which are static, seems > like a

Re: [PHP-DEV] [RFC] Constructor Property Promotion

2020-04-02 Thread Nikita Popov
On Thu, Apr 2, 2020 at 1:35 AM Markus Fischer wrote: > Hi, > On 2020-03-26 14:30, Nikita Popov wrote: > > I would like to submit the following RFC for your consideration: > > https://wiki.php.net/rfc/constructor_promotion > > > > This is based on one off the

[PHP-DEV] Re: [RFC] Stricter type-checks for arithmetic/bitwise operators

2020-04-02 Thread Nikita Popov
On Thu, Apr 2, 2020 at 10:35 AM Christoph M. Becker wrote: > On 02.04.2020 at 10:14, Nikita Popov wrote: > > > I would like to propose making the use of arithmetic/bitwise operators on > > arrays, resources and (non-overloaded) objects a TypeError exception: > > >

[PHP-DEV] [RFC] Stricter type-checks for arithmetic/bitwise operators

2020-04-02 Thread Nikita Popov
Hi internals, I would like to propose making the use of arithmetic/bitwise operators on arrays, resources and (non-overloaded) objects a TypeError exception: https://wiki.php.net/rfc/arithmetic_operator_type_checks This is inspired by some of the recent discussions, in particular the operator

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

2020-03-30 Thread Nikita Popov
On Mon, Mar 30, 2020 at 3:06 AM Levi Morrison via internals < internals@lists.php.net> wrote: > The current RFC text is not consistent with using `=` or `=>` for the > assignments. The assignment `=` is vastly more common, though, and I > don't understand why if we are using an array syntax we

<    1   2   3   4   5   6   7   8   9   10   >