[$] A PHP syntax for discardable assignments

Post Syndicated from coogle original https://lwn.net/Articles/833717/rss

Recently, John Bafford
revived
a years-long conversation on expanding the syntax of the PHP
foreach statement to include iterating solely over keys. Bafford,
who wrote a
patch
and request for
comments
(RFC) on the matter back in 2016, hopes to update his work and
convince the community to adopt the abbreviated syntax in PHP 8.1. The
community took Bafford’s general idea and expanded it into other areas of the
language.