public function findLast() {
		if (func_num_args() == 1) {
			$callback = func_get_arg(0);
		} else {
			$query = func_get_arg(0);
			$callback = func_get_arg(1);
		}

		$reverse = array_reverse($this->array, true);
		foreach ($reverse as $element) {
			$return = func_num_args() == 1 ? $callback($element) : $callback($element, $query);

			if ($return) {
				return $element;
			}
		}

		return null;
	}
public function findLast() {
		if (func_num_args() == 1) {
			$callback = func_get_arg(0);
		} else {
			$query = func_get_arg(0);
			$callback = func_get_arg(1);
		}

		$reverse = array_reverse($this->array, true);
		foreach ($reverse as $element) {
			$return = func_num_args() == 1 ? $callback($element) : $callback($element, $query);

			if ($return) {
				return $element;
			}
		}

		return null;
	}
public function findLast ( ) { if ( func_num_args ( ) == 1 ) { $ callback = func_get_arg ( 0 ) ; } else { $ query = func_get_arg ( 0 ) ; $ callback = func_get_arg ( 1 ) ; } $ reverse = array_reverse ( $ this -> array , true ) ; foreach ( $ reverse as $ element ) { $ return = func_num_args ( ) == 1 ? $ callback ( $ element ) : $ callback ( $ element , $ query ) ; if ( $ return ) { return $ element ; } } return null ; }
Searches the array with a given callback and returns the last element if found.

The callback function takes one or two parameters:

function ($element [, $query]) {}

The callback must return a boolean

@param mixed $query OPTIONAL the provided query
@param callable $callback the callback function
@return mixed|null the found element or null if it hasn't been found
Searches the array with a given callback and returns the last element if found .