Hi Dave,

Regarding the =& open issue in the RFC, I don't think the =& syntax makes sense to me. The thing on the right-hand side of a list() assignment is the array, not its values. It makes no difference for the purposes of assigning from its values if the array is a reference or not, so I'd expect the & here to do nothing at all. So, having the &s only on the left-hand side makes more sense to me. I think supporting =& would be a potential source of confusion.

On a different note, the RFC doesn't mention support for the shorthand list() syntax introduced in 7.1 (i.e. `[&$a, &$b, &$c] = $arr;`). Since it shares its implementation with list(), I assume it is indeed supported, but you should probably explicitly whether or not it is, for clarity's sake.

Thanks for your work on this! I'm glad to see it revived. :)

--
Andrea Faulds
https://ajf.me/

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

Reply via email to