Re: [PHP-DEV] [RFC][DISCUSSION] Change var_export() array syntax touse short hand arrays

2020-04-09 Thread Sherif Ramadan
> > > I have no strong opinion > either way, but anyway it cannot work as is, because var_export > already has a second optional parameter (bool $return = false). > Yes, I meant the third argument. I updated the RFC to reflect that. Sorry. > Moreover the RFC currently says that

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

2020-04-09 Thread Larry Garfield
On Thu, Apr 9, 2020, at 10:05 AM, Rowan Tommins wrote: > On Thu, 9 Apr 2020 at 13:18 (and subsequent correction), Dan Ackroyd < > dan...@basereality.com> wrote: > > > > $a = new A; > > > $b = new B; > > > var_dump($b + $a); # calls B::__add($b, $a); OK > > > var_dump($a + $b); # calls

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

2020-04-09 Thread Rowan Tommins
On Thu, 9 Apr 2020 at 13:18 (and subsequent correction), Dan Ackroyd < dan...@basereality.com> wrote: > > $a = new A; > > $b = new B; > > var_dump($b + $a); # calls B::__add($b, $a); OK > > var_dump($a + $b); # calls A::__add($a, $b), which is a TypeError > > > ... that code does have a

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

2020-04-09 Thread Christoph M. Becker
On 09.04.2020 at 14:41, Dan Ackroyd wrote: > On Thu, 9 Apr 2020 at 13:18, Dan Ackroyd wrote: > >> It appears to be the same error case as: >> > > And that code had a mistake. Should have been: > > ``` > class A { > public function add(A $rhs) {...} > } > > class B { > public function

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

2020-04-09 Thread Paul M. Jones
> On Apr 9, 2020, at 02:29, Côme Chilliet > wrote: > > Le mercredi 8 avril 2020, 07:35:10 CEST Paul M. Jones a écrit : > >> **Lesson:** Of functionality that can be accomplished in userland, only >> trivial/simple functionality is acceptable. > > My take on that is more that functionality

[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 again, in particular

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

2020-04-09 Thread Dan Ackroyd
On Thu, 9 Apr 2020 at 13:18, Dan Ackroyd wrote: > It appears to be the same error case as: > And that code had a mistake. Should have been: ``` class A { public function add(A $rhs) {...} } class B { public function add(A|B $rhs) {...} } $a = new A; $b = new B; $b->add($a); // Ok

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

2020-04-09 Thread Dan Ackroyd
On Mon, 6 Apr 2020 at 20:36, wrote: > > Hi internals, > > I have closed the voting. With 38 in favor and 28 against the RFC is DECLINED > (didn’t reach the needed 2/3 majority for a new feature). > > Thanks to everyone who has participated. > Hi Jan, Thanks for running the RFC. Although it

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

2020-04-09 Thread Mark Randall
On 09/04/2020 10:50, Guilliam Xavier wrote: I'm personally favorable, but since some concern has been raised that it *might* be interpreted as "encouraging" functions with many parameter The only comment I saw was from Jakob Givoni that said: "Are we encouraging functions with long lists of

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

2020-04-09 Thread Guilliam Xavier
On Thu, Apr 9, 2020 at 10:02 AM Nikita Popov wrote: > > 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... > > > >

[PHP-DEV] [VOTE] Type casting in array destructuring expressions

2020-04-09 Thread Enno Woortmann
Hi together, I have opened the voting for adding type casting in array destructuring expressions: https://wiki.php.net/rfc/typecast_array_desctructuring As the future scopes section of this proposal includes additional possible topics (eg. strict casts or the alternative solution via regular

Re: [PHP-DEV] [RFC] Change default PDO error mode

2020-04-09 Thread AllenJB
Hi all, A quick "bump" to make sure everyone's seen this RFC amongst all the other exciting discussions that are going on. I'm hoping the lack of discussion means this is a boring obvious change that everyone's going to vote 'yes' to. With the lack of any raised concerns or issues, I

[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 to move this to voting

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

2020-04-09 Thread Côme Chilliet
Le mercredi 8 avril 2020, 07:35:10 CEST Paul M. Jones a écrit : > ## Lessons Learned > > ### Userland Functionality > > The initial impression is that there is a strong desire for work that *can* > be done in userland to *stay* in userland. However, that impression conflicts > with the recent