Re: [PHP-DEV] [RFC] Unary null coalescing operator

2017-06-22 Thread Nikita Popov
On Thu, Jun 22, 2017 at 10:52 PM, Andrea Faulds wrote: > Hi Stas, > > Stanislav Malyshev wrote: > >> Hi! >> >> I think that `if ($_GET['x']?? === 1)` looks and feels a lot like `if >>> (@$_GET['x'] === 1)`... >>> >>> Yes, the latter has runtime performance issues and will still send >>> notices

Re: [PHP-DEV] [RFC] Unary null coalescing operator

2017-06-22 Thread Andrea Faulds
Hi Stas, Stanislav Malyshev wrote: Hi! I think that `if ($_GET['x']?? === 1)` looks and feels a lot like `if (@$_GET['x'] === 1)`... Yes, the latter has runtime performance issues and will still send notices to error handlers and logs. But perhaps if we're going to extend syntax, the syntax

Re: [PHP-DEV] [RFC] Unary null coalescing operator

2017-06-21 Thread Stanislav Malyshev
Hi! > I think that `if ($_GET['x']?? === 1)` looks and feels a lot like `if > (@$_GET['x'] === 1)`... > > Yes, the latter has runtime performance issues and will still send > notices to error handlers and logs. But perhaps if we're going to > extend syntax, the syntax could be something along t

Re: [PHP-DEV] [RFC] Unary null coalescing operator

2017-06-21 Thread Sara Golemon
On Wed, Jun 21, 2017 at 4:15 PM, Andrea Faulds wrote: >> The double @@ could indicate "No, really, don't send any kind of >> warning (or lower) anywhere. Just deal with it. And as a bonus, the >> @@ syntax is valid in older PHPs (acting like a single @). > > I'm not entirely sure if you're troll

Re: [PHP-DEV] [RFC] Unary null coalescing operator

2017-06-21 Thread Andrea Faulds
Hi Sara, Sara Golemon wrote: On Wed, Jun 21, 2017 at 1:05 PM, Andrea Faulds wrote: Here's a small RFC for a small feature, which I've wondered about for a while: https://wiki.php.net/rfc/unary_null_coalescing_operator What do you think of it? I think that `if ($_GET['x']?? === 1)` looks an

Re: [PHP-DEV] [RFC] Unary null coalescing operator

2017-06-21 Thread Sara Golemon
On Wed, Jun 21, 2017 at 1:05 PM, Andrea Faulds wrote: > Here's a small RFC for a small feature, which I've wondered about for a > while: https://wiki.php.net/rfc/unary_null_coalescing_operator > > What do you think of it? > I think that `if ($_GET['x']?? === 1)` looks and feels a lot like `if (@$

Re: [PHP-DEV] [RFC] Unary null coalescing operator

2017-06-21 Thread Fleshgrinder
On 6/21/2017 7:05 PM, Andrea Faulds wrote: > Hi all, > > Here's a small RFC for a small feature, which I've wondered about for a > while: https://wiki.php.net/rfc/unary_null_coalescing_operator > > What do you think of it? > > Thanks! I would prefer [1] to be extended to any and everything that

[PHP-DEV] [RFC] Unary null coalescing operator

2017-06-21 Thread Andrea Faulds
Hi all, Here's a small RFC for a small feature, which I've wondered about for a while: https://wiki.php.net/rfc/unary_null_coalescing_operator What do you think of it? Thanks! -- Andrea Faulds https://ajf.me/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http