src/Support/Arr.php
/**
	 * Return the last element in an array passing a given truth test. If no truth test is provided, returns the very
	 * last element in the array.
	 *
	 * @param array $array
	 * @param callable|null $callback
	 * @param mixed $default
	 * @return mixed
	 */
Return the last element in an array passing a given truth test. If no truth test is provided, returns the very
last element in the array.

@param array $array
@param callable|null $callback
@param mixed $default
@return mixed
Return the last element in an array passing a given truth test . If no truth test is provided returns the very last element in the array . @param array $array @param callable|null $callback @param mixed $default @return mixed
public static function last($array, $callback = null, $default = null) {
		if (is_null($callback)) {
			return empty($array) ? $default : end($array);
		}
		return static::first(array_reverse($array, true), $callback, $default);
	}
public static function last ( $ array , $ callback = null , $ default = null ) { if ( is_null ( $ callback ) ) { return empty ( $ array ) ? $ default : end ( $ array ) ; } return static :: first ( array_reverse ( $ array , true ) , $ callback , $ default ) ; }
Return the last element in an array passing a given truth test.
Return the last element in an array passing a given truth test .