Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/array_first_last.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ function array_first(array $array): mixed {
}

/**
* Returns the first value of a given array.
* Returns the last value of a given array.
*
* @param array $array The array to get the first value of.
* @return mixed First value of the array, or null if the array is
* @param array $array The array to get the last value of.
* @return mixed Last value of the array, or null if the array is
* empty. Note that null itself can also be a valid array value.
*/
function array_last(array $array): mixed {
Expand All @@ -37,10 +37,10 @@ function array_first(array $array) {
}

/**
* Returns the first value of a given array.
* Returns the last value of a given array.
*
* @param array $array The array to get the first value of.
* @return mixed First value of the array, or null if the array is
* @param array $array The array to get the last value of.
* @return mixed Last value of the array, or null if the array is
* empty. Note that null itself can also be a valid array value.
*/
function array_last(array $array) {
Expand Down