Re: [PHP-DEV] [RFC] [Vote] Short Ternary Assignment Operator

2016-03-24 Thread Sara Golemon
On Thu, Mar 24, 2016 at 9:45 AM, Nikita Popov  wrote:
> To clarify, as the RFC only mentions this by implication:
>
> unset($x); // Assume $x is undefined
> $x ?:= $y;
>
> This will throw a notice, correct?
>
Yes.  The equivalent short-ternary:

$x = $x ?: $y;

would throw a notice, so the assignment version should (and would) as well.

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] [RFC] [Vote] Short Ternary Assignment Operator

2016-03-24 Thread Nikita Popov
On Thu, Mar 24, 2016 at 4:51 PM, Sara Golemon  wrote:

> Following on from Midori, I've moved the short-ternary assignment
> operator RFC into voting phase.
> The implementation for which will be her patch with appropriately
> different symbols and tests.
> https://wiki.php.net/rfc/short_ternary_equal_operator
>

To clarify, as the RFC only mentions this by implication:

unset($x); // Assume $x is undefined
$x ?:= $y;

This will throw a notice, correct?

Thanks,
Nikita


Re: [PHP-DEV] [RFC] [Vote] Short Ternary Assignment Operator

2016-03-24 Thread Ryan Pallas
On Thu, Mar 24, 2016 at 9:51 AM, Sara Golemon  wrote:

> Following on from Midori, I've moved the short-ternary assignment
> operator RFC into voting phase.
> The implementation for which will be her patch with appropriately
> different symbols and tests.
> https://wiki.php.net/rfc/short_ternary_equal_operator


I like this as well, +1 for me :) Good luck, hope to see it in 7.1!


>
>
> -Sara
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>