> if ([$key, $value] = array_last($input) { > +1 for this proposal, I would even go one step further and suggest a single function, with an index as second argument:
`if ([$key, $value] = array_index($input, $index) {` when `0 === $index` => returns the first, `-1 === $index` returns the last, etc.