← All docs
array_last()
Returns the last value of an array in insertion order, or null when it is empty.
array_last()
function array_last(array $array): mixed
Returns the last value of an array in insertion order, or null when it is empty.
Parameters:
$array(array)
Returns: mixed
Availability
| Compiled (AOT) | Magician (eval) |
|---|---|
| Available | Not available yet |
No examples yet. Check examples/ and showcases/ for usage patterns.
Internals
For how array_last is implemented in the compiler, see the internals page.