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

2020-03-27 Thread Johannes Schlüter
On Mon, 2020-03-23 at 18:58 +0100, jan.h.boeh...@gmx.de wrote: > Hi internals, > > I have opened voting on > https://wiki.php.net/rfc/userspace_operator_overloading, which allows > users to overload operators in their own classes. > I consider operator overlaoding in general a good feature

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

2020-03-27 Thread Marcio Almada
> > 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 > > Nikita I have no idea why we failed to approve trailing comma over lists in general, but

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

2020-03-27 Thread Christoph M. Becker
On 27.03.2020 at 14:58, tyson andre wrote: > I'd just like to add that > https://wiki.php.net/rfc/trailing_comma_in_parameter_list seems useful, > especially now that PSR-12 is approved and > https://www.php-fig.org/psr/psr-12/#45-method-and-function-arguments > recommends that > "When the

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

2020-03-27 Thread tyson andre
Hi internals, I'd just like to add that https://wiki.php.net/rfc/trailing_comma_in_parameter_list seems useful, especially now that PSR-12 is approved and https://www.php-fig.org/psr/psr-12/#45-method-and-function-arguments recommends that "When the argument list is split across multiple

Re: [PHP-DEV] [RFC] switch expression

2020-03-27 Thread Ilija Tovilo
Hi Gabriel > This doesn't look like it can do fallbacks which are traditional feature of > switch statements, can it? You can take a look at the tests to get a feel for what it’s like: https://github.com/php/php-src/pull/5308/files Multiple conditions are possible: ``` return

Re: [PHP-DEV] [RFC] switch expression

2020-03-27 Thread Gabriel O
This doesn't look like it can do fallbacks which are traditional feature of switch statements, can it? What I mean is this ``` case foo: case bar: return 1; case baz: return 2; ``` If we can't do that, I would suggest to go with different name, rather than reusing "switch".

Re: [PHP-DEV] Re: semicolon terminator for switch cases

2020-03-27 Thread Ilija Tovilo
Hi Andrea The reason this doesn't work anymore: ``` If (false); echo 'Test'; endif; ``` Is because the semicolon is an empty statement: https://github.com/php/php-src/blob/9e77d5a9da9e80a1bfe226f60ccb12fd8bf9481c/Zend/zend_language_parser.y#L457 This is still valid code: ``` If (false);