On 01/01/2016 21:55, Paul Dragoonis wrote:
Thus it would look like this:
$val = $array[array_key_last($array)];

Or how about a matching set of array_value_* functions?

Granted, we can currently use reset() and last() for array_value_first() and array_value_last(), but that always feels a bit ugly to me. The name "reset" is hardly obvious, and the side-effects of "resetting the internal array pointer" even less so (e.g. how does it affect copy-on-write?).

Regards,

--
Rowan Collins
[IMSoP]


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

Reply via email to