src/Utilities/Arrays.php
public static function isLastElement(array $array, $element, $firstLevelOnly = true)
    {
        $lastElement = self::getLastElement($array, $firstLevelOnly);

        return $element === $lastElement;
    }
public static function isLastElement(array $array, $element, $firstLevelOnly = true)
    {
        $lastElement = self::getLastElement($array, $firstLevelOnly);

        return $element === $lastElement;
    }
public static function isLastElement ( array $ array , $ element , $ firstLevelOnly = true ) { $ lastElement = self :: getLastElement ( $ array , $ firstLevelOnly ) ; return $ element === $ lastElement ; }
Returns information if given element is the last one

@param array $array          The array to get the last element of
@param mixed $element        The element to check / verify
@param bool  $firstLevelOnly (optional) If is set to true, last element is returned. Otherwise - totally
last element is returned (last of the latest array).
@return bool
Returns information if given element is the last one